/** * This method is a shorthand for {@link #transcode(java.io.InputStream, String, java.io.OutputStream, String, int)} * called with a {@link BufferPool#getDefaultBufferSize() default buffer size}. * * @param in the InputStream to read from * @param inCharset the source charset * @param out the OutputStream to write to * @param outCharset the destination charset * @return the number of bytes that were transcoded * @throws FileTransferException if something went wrong while reading from or writing to one of the provided streams * @throws UnsupportedEncodingException if any of the two charsets are not supported by the JVM */ public static long transcode(InputStream in, String inCharset, OutputStream out, String outCharset) throws FileTransferException, UnsupportedEncodingException { return transcode(in, inCharset, out, outCharset, BufferPool.getDefaultBufferSize()); }