org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder类的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(59)

本文整理了Java中org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder类的一些代码示例,展示了QuotedPrintableDecoder类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuotedPrintableDecoder类的具体详情如下:
包路径:org.apache.commons.fileupload.util.mime.QuotedPrintableDecoder
类名称: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);

相关文章

微信公众号

最新文章

更多