private void marshallBinaryPayload(Object val) {
        if (val instanceof ByteBuffer) {
            request.setContent(BinaryUtils.toStream((ByteBuffer) val));
        } else if (val instanceof InputStream) {
            request.setContent((InputStream) val);
        }
    }
private void marshallBinaryPayload ( Object val ) { if ( val instanceof ByteBuffer ) { request . setContent ( BinaryUtils . toStream ( ( ByteBuffer ) val ) ) ; } else if ( val instanceof InputStream ) { request . setContent ( ( InputStream ) val ) ; } }
Binary data should be placed as is, directly into the content.