下面列出了怎么用com.esotericsoftware.kryo.io.FastOutput的API类实例代码及写法,或者点击链接到github查看源代码。
public void openFileForWriting()
{
try
{
File destinationFile = newFileStrategy.getNewFile();
LOG.info("{} storing events to: {}", newFileStrategy.toString(), destinationFile.getAbsolutePath());
FileOutputStream fos = new FileOutputStream(destinationFile);
OutputStream out = storeInGzip ? new GZIPOutputStream(fos, true) : fos;
output = new FastOutput(out);
}
catch (IOException e)
{
e.printStackTrace();
}
}
@Override
protected Output initialValue() {
return new FastOutput(DEFAULT_BUF_SIZE, -1);
}