public UnixOwnersHeader(SubBlockHeader sb, byte[] uoHeader) {
   super(sb);
   int pos = 0;
   ownerNameSize = Raw.readShortLittleEndian(uoHeader, pos) & 0xFFFF;
   pos += 2;
   groupNameSize = Raw.readShortLittleEndian(uoHeader, pos) & 0xFFFF;
   pos += 2;
   if (pos + ownerNameSize < uoHeader.length) {
     byte[] ownerBuffer = new byte[ownerNameSize];
     System.arraycopy(uoHeader, pos, ownerBuffer, 0, ownerNameSize);
     owner = new String(ownerBuffer);
   }
   pos += ownerNameSize;
   if (pos + groupNameSize < uoHeader.length) {
     byte[] groupBuffer = new byte[groupNameSize];
     System.arraycopy(uoHeader, pos, groupBuffer, 0, groupNameSize);
     group = new String(groupBuffer);
   }
 }
Exemplo n.º 2
0
  public BlockHeader(BaseBlock bb, byte[] blockHeader) {
    super(bb);

    this.packSize = Raw.readIntLittleEndian(blockHeader, 0);
    this.dataSize = this.packSize;
  }
Exemplo n.º 3
0
 public void setStats(int state) {
   Raw.writeIntLittleEndian(mem, pos + 2, state);
 }
Exemplo n.º 4
0
 public int getStats() {
   return Raw.readIntLittleEndian(mem, pos + 2);
 }
Exemplo n.º 5
0
 public void incSummFreq(int dSummFreq) {
   Raw.incShortLittleEndian(mem, pos, dSummFreq);
 }
Exemplo n.º 6
0
 public void setSummFreq(int summFreq) {
   Raw.writeShortLittleEndian(mem, pos, (short) summFreq);
 }
Exemplo n.º 7
0
 public int getSummFreq() {
   return Raw.readShortLittleEndian(mem, pos) & 0xffff;
 }