/** * Get the contents of an <code>InputStream</code> as a <code>byte[]</code>. */ public static byte[] toByteArray(final InputStream input) throws IOException { return toByteArray(input, DEFAULT_BUFFER_SIZE); }
/** * Get the contents of a <code>String</code> as a <code>byte[]</code>. */ public static byte[] toByteArray(final String input) throws IOException { return toByteArray(input, DEFAULT_BUFFER_SIZE); }
/** * Get the contents of a <code>Reader</code> as a <code>byte[]</code>. */ public static byte[] toByteArray(final Reader input) throws IOException { return toByteArray(input, DEFAULT_BUFFER_SIZE); }