static protected void writeMessage(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_LENGTH_DELIMITED); message.writeFramed(output); }
static protected void writeMessage(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_LENGTH_DELIMITED); message.writeFramed(output); }
static protected void writeMessage(CodedOutputStream output, int tag, BaseMessage message) throws IOException { output.writeTag(tag, WIRETYPE_LENGTH_DELIMITED); message.writeFramed(output); }
public void writeFramed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeFramed(codedOutput); codedOutput.flush(); }
public void writeFramed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeFramed(codedOutput); codedOutput.flush(); }
public void writeFramed(OutputStream output) throws IOException { CodedOutputStream codedOutput = new CodedOutputStream(output); writeFramed(codedOutput); codedOutput.flush(); }
public Buffer toFramedBuffer() { try { int size = serializedSizeFramed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeFramed(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 toFramedBuffer() { try { int size = serializedSizeFramed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeFramed(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 toFramedBuffer() { try { int size = serializedSizeFramed(); BufferOutputStream baos = new BufferOutputStream(size); CodedOutputStream output = new CodedOutputStream(baos); writeFramed(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); } }