コード例 #1
0
ファイル: MessageUtils.java プロジェクト: MTuner/RiaCrawler
 /**
  * @param content
  * @param codings
  * @return
  * @throws MessageFormatException
  */
 public static InputStream encode(MessageHeader header, InputStream content)
     throws MessageFormatException {
   String codings = header.getHeader("Content-Encoding");
   content = encode(codings, content);
   codings = header.getHeader("Transfer-Encoding");
   content = encode(codings, content);
   return content;
 }
コード例 #2
0
ファイル: MessageUtils.java プロジェクト: MTuner/RiaCrawler
 public static InputStream decode(MessageHeader message, InputStream content)
     throws IOException, MessageFormatException {
   if (content == null) return content;
   String codings = message.getHeader(TRANSFER_ENCODING);
   content = decode(codings, content);
   codings = message.getHeader(CONTENT_ENCODING);
   content = decode(codings, content);
   return content;
 }