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

Examples of org.waveprotocol.box.server.persistence.protos.ProtoDeltaStoreData.ProtoTransformedWaveletDelta


      throw new IOException("Invalid delta length");
    }

    byte[] bytes = new byte[transformedDeltaLength];
    file.readFully(bytes);
    ProtoTransformedWaveletDelta delta;
    try {
      delta = ProtoTransformedWaveletDelta.parseFrom(bytes);
    } catch (InvalidProtocolBufferException e) {
      throw new IOException(e);
    }
View Full Code Here


   * Write a {@link TransformedWaveletDelta} to the file at the current location.
   * @return length of written data
   */
  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);
  }
View Full Code Here

      throw new IOException("Invalid delta length");
    }

    byte[] bytes = new byte[transformedDeltaLength];
    file.readFully(bytes);
    ProtoTransformedWaveletDelta delta;
    try {
      delta = ProtoTransformedWaveletDelta.parseFrom(bytes);
    } catch (InvalidProtocolBufferException e) {
      throw new IOException(e);
    }
View Full Code Here

   * Write a {@link TransformedWaveletDelta} to the file at the current location.
   * @return length of written data
   */
  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);
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.box.server.persistence.protos.ProtoDeltaStoreData.ProtoTransformedWaveletDelta

Copyright © 2018 www.massapicom. 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.