本文整理了Java中org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder
类的一些代码示例,展示了QuotedPrintableDecoder
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuotedPrintableDecoder
类的具体详情如下:
包路径:org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder
类名称:QuotedPrintableDecoder
暂无
代码示例来源: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
int c1 = hexToBinary(b1);
int c2 = hexToBinary(b2);
out.write((c1 << UPPER_NIBBLE_SHIFT) | c2);
代码示例来源: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: Nextdoor/bender
int c1 = hexToBinary(b1);
int c2 = hexToBinary(b2);
out.write((c1 << UPPER_NIBBLE_SHIFT) | c2);
代码示例来源: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: com.yanzhenjie.apache/fileupload
int c1 = hexToBinary(b1);
int c2 = hexToBinary(b2);
out.write((c1 << UPPER_NIBBLE_SHIFT) | c2);
代码示例来源: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);
内容来源于网络,如有侵权,请联系作者删除!