/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }
/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }
/** * Get the JSON content as a UTF-8 encoded byte array. It is recommended to hold onto the array * reference rather then making repeated calls to this method as a new array will be created * each time. * * @return Array of UTF-8 encoded bytes that make up the generated JSON. */ @Override public byte[] getBytes() { close(); return baos.toByteArray(); }