我有一个迷你服务器
byte[] content = fileManager.get(request.getUri());
这里我得到服务器上文件的内容
接下来我产生压缩和分块
content = process(content, response);
private byte[] process(byte[] content, Response response) {
ProcessorList processors = new ProcessorList();
processors.add(new CompressDelegator(new GZIPCompressor()));
processors.add(new ChunkDelegator(new Chunker(30)));
content = processors.process(content, response);
return content;
}
在那之后,令人惊奇的事情发生在文件的压缩和分块内容中
System.out.println(Arrays.toString(content));
System.out.println(Arrays.toString(new String(content).getBytes()));
其中两个将打印不同的答案。为什么?