Package org.waveprotocol.box.server.persistence.protos.ProtoDeltaStoreData

Examples of org.waveprotocol.box.server.persistence.protos.ProtoDeltaStoreData.ProtoTransformedWaveletDelta.writeTo()


   */
  private int writeTransformedWaveletDelta(TransformedWaveletDelta delta) throws IOException {
    long startingPosition = file.getFilePointer();
    ProtoTransformedWaveletDelta protoDelta = ProtoDeltaStoreDataSerializer.serialize(delta);
    OutputStream stream = Channels.newOutputStream(file.getChannel());
    protoDelta.writeTo(stream);
    return (int) (file.getFilePointer() - startingPosition);
  }

  /**
   * Read a delta to the file. Does not move the file pointer before writing. Returns number of
View Full Code Here


   */
  private int writeTransformedWaveletDelta(TransformedWaveletDelta delta) throws IOException {
    long startingPosition = file.getFilePointer();
    ProtoTransformedWaveletDelta protoDelta = ProtoDeltaStoreDataSerializer.serialize(delta);
    OutputStream stream = Channels.newOutputStream(file.getChannel());
    protoDelta.writeTo(stream);
    return (int) (file.getFilePointer() - startingPosition);
  }

  /**
   * Read a delta to the file. Does not move the file pointer before writing. Returns number of
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.