private static Optional<byte[]> toByteArray(RestApi.RequestContext context) {
        InputStream in = toInputStream(context).orElse(null);
        if (in == null) return Optional.empty();
        return convertIoException(() -> Optional.of(in.readAllBytes()));
    }
Implementations of {@link ExceptionMapper}, {@link RequestMapper} and {@link ResponseMapper}.

@author bjorncs
container-core/src/main/java/com/yahoo/restapi/RestApiMappers.java