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); } }
public BlockHeader(BaseBlock bb, byte[] blockHeader) { super(bb); this.packSize = Raw.readIntLittleEndian(blockHeader, 0); this.dataSize = this.packSize; }
public void setStats(int state) { Raw.writeIntLittleEndian(mem, pos + 2, state); }
public int getStats() { return Raw.readIntLittleEndian(mem, pos + 2); }
public void incSummFreq(int dSummFreq) { Raw.incShortLittleEndian(mem, pos, dSummFreq); }
public void setSummFreq(int summFreq) { Raw.writeShortLittleEndian(mem, pos, (short) summFreq); }
public int getSummFreq() { return Raw.readShortLittleEndian(mem, pos) & 0xffff; }