@Test public void testTrailingSpecial() throws Exception { final QuotedPrintableCodec qpcodec = new QuotedPrintableCodec(true); String plain ="This is a example of a quoted-printable text file. This might contain sp=cial chars."; String expected = "This is a example of a quoted-printable text file. This might contain sp=3D=\r\ncial chars."; assertEquals(expected, qpcodec.encode(plain)); plain ="This is a example of a quoted-printable text file. This might contain ta\tbs as well."; expected = "This is a example of a quoted-printable text file. This might contain ta=09=\r\nbs as well."; assertEquals(expected, qpcodec.encode(plain)); }
@Override public byte[] encode(final byte[] bytes) { return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict); }
QuotedPrintableCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder { @Override public byte[] encode(final byte[] bytes) { return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict); } }
QuotedPrintableCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder { @Override public byte[] encode(final byte[] bytes) { return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict); } QuotedPrintableCodec();  QuotedPrintableCodec(final boolean strict);  QuotedPrintableCodec(final Charset charset);  QuotedPrintableCodec(final Charset charset, final boolean strict);  QuotedPrintableCodec(final String charsetName); }
QuotedPrintableCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder { @Override public byte[] encode(final byte[] bytes) { return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict); } QuotedPrintableCodec();  QuotedPrintableCodec(final boolean strict);  QuotedPrintableCodec(final Charset charset);  QuotedPrintableCodec(final Charset charset, final boolean strict);  QuotedPrintableCodec(final String charsetName); static final byte[] encodeQuotedPrintable(BitSet printable, final byte[] bytes); static final byte[] encodeQuotedPrintable(BitSet printable, final byte[] bytes, boolean strict); static final byte[] decodeQuotedPrintable(final byte[] bytes); @Override byte[] encode(final byte[] bytes); @Override byte[] decode(final byte[] bytes); @Override String encode(final String str); String decode(final String str, final Charset charset); String decode(final String str, final String charset); @Override String decode(final String str); @Override Object encode(final Object obj); @Override Object decode(final Object obj); Charset getCharset(); String getDefaultCharset(); String encode(final String str, final Charset charset); String encode(final String str, final String charset); }
QuotedPrintableCodec implements BinaryEncoder, BinaryDecoder, StringEncoder, StringDecoder { @Override public byte[] encode(final byte[] bytes) { return encodeQuotedPrintable(PRINTABLE_CHARS, bytes, strict); } QuotedPrintableCodec();  QuotedPrintableCodec(final boolean strict);  QuotedPrintableCodec(final Charset charset);  QuotedPrintableCodec(final Charset charset, final boolean strict);  QuotedPrintableCodec(final String charsetName); static final byte[] encodeQuotedPrintable(BitSet printable, final byte[] bytes); static final byte[] encodeQuotedPrintable(BitSet printable, final byte[] bytes, boolean strict); static final byte[] decodeQuotedPrintable(final byte[] bytes); @Override byte[] encode(final byte[] bytes); @Override byte[] decode(final byte[] bytes); @Override String encode(final String str); String decode(final String str, final Charset charset); String decode(final String str, final String charset); @Override String decode(final String str); @Override Object encode(final Object obj); @Override Object decode(final Object obj); Charset getCharset(); String getDefaultCharset(); String encode(final String str, final Charset charset); String encode(final String str, final String charset);  }