public void write ( String key , String document ) throws IOException { try { // Write the key. outputStream . write ( key . getBytes ( "UTF-8" ) ) ; // Write the key-document keyDocumentDelimiter. outputStream . write ( keyDocumentDelimiter . getBytes ( "UTF-8" ) ) ; // Write the document. outputStream . write ( document . getBytes ( "UTF-8" ) ) ; // Write the row keyDocumentDelimiter. outputStream . write ( rowDelimiter . getBytes ( "UTF-8" ) ) ; } catch ( UnsupportedEncodingException e ) { LOGGER . error ( "Shouldn't happen." ) ; } }
Write a Couchbase document