@Override public String toString() { return new String(toByteArray()); }
@Override public String toString() { return new String(toByteArray()); }
/** * This is recommended to be used where there's more than 1 buffer to write, instead * use {@link #writeTo(java.io.Writer, String)} which auto detects if * {@link #writeToViaString(java.io.Writer, String)} is to be used or * {@link #writeToViaSmoosh(java.io.Writer, String)}. * * @param out * @param encoding * @throws IOException */ void writeToViaSmoosh(Writer out, String encoding) throws IOException { byte[] bufferToWrite = toByteArray(); int bufferToWriteLen = bufferToWrite.length; writeToImpl(out, encoding, bufferToWrite, bufferToWriteLen); }
/** * This is recommended to be used where there's more than 1 buffer to write, instead * use {@link #writeTo(java.io.Writer, String)} which auto detects if * {@link #writeToViaString(java.io.Writer, String)} is to be used or * {@link #writeToViaSmoosh(java.io.Writer, String)}. * * @param out * @param encoding * @throws IOException */ void writeToViaSmoosh(Writer out, String encoding) throws IOException { byte[] bufferToWrite = toByteArray(); int bufferToWriteLen = bufferToWrite.length; writeToImpl(out, encoding, bufferToWrite, bufferToWriteLen); }
return baos.toByteArray();
return baos.toByteArray();
return baos.toByteArray();
return baos.toByteArray();