static protected void writeGroup(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_START_GROUP); message.writeUnframed(output); output.writeTag(tag, WIRETYPE_END_GROUP); }
public void writeUnframed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeUnframed(codedOutput); codedOutput.flush(); }
public void writeUnframed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeUnframed(codedOutput); codedOutput.flush(); }
public void writeFramed(CodedOutputStream output) throws IOException { output.writeRawVarint32(serializedSizeUnframed()); writeUnframed(output); }
public void writeFramed(CodedOutputStream output) throws IOException { output.writeRawVarint32(serializedSizeUnframed()); writeUnframed(output); }
public void writeUnframed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeUnframed(codedOutput); codedOutput.flush(); }
public void writeFramed(CodedOutputStream output) throws IOException { output.writeRawVarint32(serializedSizeUnframed()); writeUnframed(output); }
static protected void writeGroup(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_START_GROUP); message.writeUnframed(output); output.writeTag(tag, WIRETYPE_END_GROUP); }
static protected void writeGroup(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_START_GROUP); message.writeUnframed(output); output.writeTag(tag, WIRETYPE_END_GROUP); }
public Buffer toUnframedBuffer() { try { int size = serializedSizeUnframed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeUnframed(output); Buffer rc = baos.toBuffer(); if( rc.length != size ) { throw new IllegalStateException("Did not write as much data as expected."); } return rc; } catch (IOException e) { throw new RuntimeException("Serializing to a byte array threw an IOException " + "(should never happen).", e); } }
public Buffer toUnframedBuffer() { try { int size = serializedSizeUnframed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeUnframed(output); Buffer rc = baos.toBuffer(); if( rc.length != size ) { throw new IllegalStateException("Did not write as much data as expected."); } return rc; } catch (IOException e) { throw new RuntimeException("Serializing to a byte array threw an IOException " + "(should never happen).", e); } }
public Buffer toUnframedBuffer() { try { int size = serializedSizeUnframed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeUnframed(output); Buffer rc = baos.toBuffer(); if( rc.length != size ) { throw new IllegalStateException("Did not write as much data as expected."); } return rc; } catch (IOException e) { throw new RuntimeException("Serializing to a byte array threw an IOException " + "(should never happen).", e); } }