Code example for ByteArrayBuffer

Methods: toByteArray

        return document;
    public void parseJsonBuffer() { 
        try { 
            document = CBLServer.getObjectMapper().readValue(jsonBuffer.toByteArray(), Map.class);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to parse json buffer", e);
        jsonBuffer = null;
    public void setContentType(String contentType) {
        if (!contentType.startsWith("multipart/")) {
            throw new IllegalArgumentException("contentType must start with multipart/");
        multipartReader = new CBLMultipartReader(contentType, this);
        attachmentsByName = new HashMap<String, CBLBlobStoreWriter>();
        attachmentsByMd5Digest = new HashMap<String, CBLBlobStoreWriter>();
Stop searching for code, let great code find you!  Add Codota to your java IDE