NioBufOutput(OutputBuf outputBuf, int minWritableBytes, int maxCapacity) { this.outputBuf = outputBuf; this.maxCapacity = maxCapacity; nioBuffer = outputBuf.nioByteBuffer(minWritableBytes); capacity = nioBuffer.remaining(); }
public static ObjectOutputStream getOutput(OutputBuf outputBuf) throws IOException { return new ObjectOutputStream(outputBuf.outputStream()); }
public static Input getInput(InputBuf inputBuf) { if (inputBuf.hasMemoryAddress()) { return new UnsafeNioBufInput(inputBuf.nioByteBuffer(), true); } return new NioBufInput(inputBuf.nioByteBuffer(), true); }
public static ObjectInputStream getInput(InputBuf inputBuf) throws IOException { return new ObjectInputStream(inputBuf.inputStream()); }
public static Input getInput(InputBuf inputBuf) { ByteBuffer nioBuf = inputBuf.nioByteBuffer(); ByteBufferInput input = new ByteBufferInput(); input.setVarIntsEnabled(false); // Compatible with FastInput input.setBuffer(nioBuf, 0, nioBuf.capacity()); return input; }
public static Output getOutput(OutputBuf outputBuf) { if (outputBuf.hasMemoryAddress()) { return new UnsafeNioBufOutput(outputBuf, -1, Integer.MAX_VALUE); } return new NioBufOutput(outputBuf, -1, Integer.MAX_VALUE); }
public static Input getInput(InputBuf inputBuf) { if (inputBuf.hasMemoryAddress()) { return new UnsafeNioBufInput(inputBuf.nioByteBuffer(), true); } return new NioBufInput(inputBuf.nioByteBuffer(), true); }
NioBufOutput(OutputBuf outputBuf, int minWritableBytes, int maxCapacity) { this.outputBuf = outputBuf; this.maxCapacity = maxCapacity; niobuffer = outputBuf.nioByteBuffer(minWritableBytes); capacity = niobuffer.remaining(); }
public static ObjectOutputStream getOutput(OutputBuf outputBuf) throws IOException { return new ObjectOutputStream(outputBuf.outputStream()); }
public static ObjectInputStream getInput(InputBuf inputBuf) throws IOException { return new ObjectInputStream(inputBuf.inputStream()); }
public static Input getInput(InputBuf inputBuf) { ByteBuffer nioBuf = inputBuf.nioByteBuffer(); ByteBufferInput input = new ByteBufferInput(); input.setVarIntsEnabled(false); // Compatible with FastInput input.setBuffer(nioBuf, 0, nioBuf.capacity()); return input; }
public static Output getOutput(OutputBuf outputBuf) { if (outputBuf.hasMemoryAddress()) { return new UnsafeNioBufOutput(outputBuf, -1, Integer.MAX_VALUE); } return new NioBufOutput(outputBuf, -1, Integer.MAX_VALUE); }
NioBufOutput(OutputBuf outputBuf, int minWritableBytes, int maxCapacity) { this.outputBuf = outputBuf; this.maxCapacity = maxCapacity; nioBuffer = outputBuf.nioByteBuffer(minWritableBytes); capacity = nioBuffer.remaining(); }
public static Hessian2Output getOutput(OutputBuf outputBuf) { return new Hessian2Output(outputBuf.outputStream()); }
public static Hessian2Input getInput(InputBuf inputBuf) { return new Hessian2Input(inputBuf.inputStream()); }
NioBufOutput(OutputBuf outputBuf, int minWritableBytes, int maxCapacity) { this.outputBuf = outputBuf; this.maxCapacity = maxCapacity; niobuffer = outputBuf.nioByteBuffer(minWritableBytes); capacity = niobuffer.remaining(); }
public static Hessian2Output getOutput(OutputBuf outputBuf) { return new Hessian2Output(outputBuf.outputStream()); }
public static Hessian2Input getInput(InputBuf inputBuf) { return new Hessian2Input(inputBuf.inputStream()); }