2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
6 package TransactionalIO.core;
8 import TransactionalIO.Utilities.Range;
14 public class WriteOperations implements Comparable{
16 protected byte[] data;
17 protected Range range;
18 private boolean unknownoffset;
19 protected TransactionLocalFileAttributes belongingto;
20 protected TransactionalFile ownertransactionalfile;
22 public WriteOperations(byte[] data, Range range, boolean unknownoffset, TransactionalFile ownertransactionalfile, TransactionLocalFileAttributes belongingto) {
25 this.unknownoffset = unknownoffset;
26 this.ownertransactionalfile = ownertransactionalfile;
27 this.belongingto = belongingto;
35 public boolean isUnknownoffset() {
39 public void setData(byte[] data) {
40 this.data = new byte[data.length];
41 System.arraycopy(data, 0, this.data, 0, data.length);
45 public void setUnknownoffset(boolean unknownoffset) {
46 this.unknownoffset = unknownoffset;
51 public int compareTo(Object other) {
52 WriteOperations tmp = (WriteOperations) other;
53 return this.range.compareTo(tmp.range);