本文整理了Java中org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder.decode
方法的一些代码示例,展示了QuotedPrintableDecoder.decode
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuotedPrintableDecoder.decode
方法的具体详情如下:
包路径:org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder
类名称:QuotedPrintableDecoder
方法名:decode
[英]Decode the encoded byte data writing it to the given output stream.
[中]解码编码字节数据,将其写入给定的输出流。
代码示例来源:origin: commons-fileupload/commons-fileupload
private static void assertEncoded(String clearText, String encoded) throws Exception {
byte[] expected = clearText.getBytes(US_ASCII_CHARSET);
ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length());
byte[] encodedData = encoded.getBytes(US_ASCII_CHARSET);
QuotedPrintableDecoder.decode(encodedData, out);
byte[] actual = out.toByteArray();
assertArrayEquals(expected, actual);
}
代码示例来源:origin: commons-fileupload/commons-fileupload
Base64Decoder.decode(encodedData, out);
} else if (encoding.equals(QUOTEDPRINTABLE_ENCODING_MARKER)) { // maybe quoted printable.
QuotedPrintableDecoder.decode(encodedData, out);
} else {
throw new UnsupportedEncodingException("Unknown RFC 2047 encoding: " + encoding);
代码示例来源:origin: commons-fileupload/commons-fileupload
private static void assertIOException(String messageText, String encoded) throws UnsupportedEncodingException {
ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length());
byte[] encodedData = encoded.getBytes(US_ASCII_CHARSET);
try {
QuotedPrintableDecoder.decode(encodedData, out);
fail("Expected IOException");
} catch (IOException e) {
String em = e.getMessage();
assertTrue("Expected to find " + messageText + " in '" + em + "'",em.contains(messageText));
}
}
代码示例来源:origin: Nextdoor/bender
Base64Decoder.decode(encodedData, out);
} else if (encoding.equals(QUOTEDPRINTABLE_ENCODING_MARKER)) { // maybe quoted printable.
QuotedPrintableDecoder.decode(encodedData, out);
} else {
throw new UnsupportedEncodingException("Unknown RFC 2047 encoding: " + encoding);
代码示例来源:origin: com.yanzhenjie.apache/fileupload
Base64Decoder.decode(encodedData, out);
} else if (encoding.equals(QUOTEDPRINTABLE_ENCODING_MARKER)) { // maybe quoted printable.
QuotedPrintableDecoder.decode(encodedData, out);
} else {
throw new UnsupportedEncodingException("Unknown RFC 2047 encoding: " + encoding);
内容来源于网络,如有侵权,请联系作者删除!