/** * Resets this output for re-use. */ public ProtostuffOutput clear() { super.clear(); return this; }
public RpcWorker(int id, byte[] buf, RpcServer server, WriteContext context) { this.id = id; this.buf = buf; // start at 5 // 0xFF 0xFF [ 0 , this.session = new WriteSession(LinkedBuffer.use(buf, 5)); this.server = server; this.context = context; kvpInput = new KvpTextByteArrayInput(buf, 0, 0); jniCodecs = ProtocolSpecificCodecs.create(RpcProtocol.DEFAULT, this, session, session.nextBufferSize); //protocolDelegate = null; }
static boolean finish(byte[] buf, WriteSession current, boolean writePrefix) throws IOException { if (!DSUtils.writeTip(current, (byte)']')) return writeData(buf, RES_BUFFER_OVERFLOW); final int size = 3 + current.getSize(); buf[0] = (byte)(size & 0xFF); buf[1] = (byte)((size >>> 8) & 0xFF); if (writePrefix) { buf[2] = '['; buf[3] = '0'; buf[4] = ','; } return true; }
sessionUdf = new WriteSession(lbUdf);
session.sink.writeByte((byte)'"', session, session.head)))))); final int size = 3 + session.getSize(); buf[0] = (byte)(size & 0xFF); buf[1] = (byte)((size >>> 8) & 0xFF);
public YamlOutput clear() { super.clear(); return this; }
/** * Resets this output for re-use. */ public ProtobufOutput clear() { super.clear(); return this; }
public ByteStringBuilder clear() { super.clear(); offsetStack[0] = head.offset = head.start + 2; size = 2; // the first index is reserved count = 1; return this; }
public SerAndIndexCollectOutput clear() { super.clear(); // unset for gc root = null; return this; }
public JsonXOutput clear() { super.clear(); return this; }
public XmlXOutput clear() { super.clear(); return this; }
public KeyBuilder clear() { super.clear(); offsetStack[0] = head.offset = head.start + 2; size = 2; // the first index is reserved count = 1; return this; }