@Override public short readShort(int offset) { assert buffer != null; return buffer.getShort((int) (start + offset)); }
short getShort(long index) { return dumpBuffer.getShort((int) index); }
@Override public short readShort() { assert buffer != null; short s = buffer.getShort((int) position); position += 2; return s; }
short getShort(long index) { return dumpBuffer[getBufferIndex(index)].getShort(getBufferOffset(index)); }
.getShort(currentOffset + kCDENameLen) & 0xffff; int extraLen = directoryMap.getShort(currentOffset + kCDEExtraLen) & 0xffff; int commentLen = directoryMap.getShort(currentOffset + kCDECommentLen) & 0xffff; ze.mMethod = directoryMap.getShort(currentOffset + kCDEMethod) & 0xffff; ze.mWhenModified = directoryMap.getInt(currentOffset + kCDEModWhen) & 0xffffffffL; ze.mCRC32 = directoryMap.getLong(currentOffset + kCDECRC) & 0xffffffffL;
.getShort(currentOffset + kCDENameLen) & 0xffff; int extraLen = directoryMap.getShort(currentOffset + kCDEExtraLen) & 0xffff; int commentLen = directoryMap.getShort(currentOffset + kCDECommentLen) & 0xffff; ze.mMethod = directoryMap.getShort(currentOffset + kCDEMethod) & 0xffff; ze.mWhenModified = directoryMap.getInt(currentOffset + kCDEModWhen) & 0xffffffffL; ze.mCRC32 = directoryMap.getLong(currentOffset + kCDECRC) & 0xffffffffL;
public ELFHeader(MappedByteBuffer fmap) throws IllegalArgumentException { if (fmap.get(ELFIdentification.EI_MAG0.value()) != 0x7f || fmap.get(ELFIdentification.EI_MAG1.value()) != 'E' || fmap.get(ELFIdentification.EI_MAG2.value()) != 'L' || fmap.get(ELFIdentification.EI_MAG3.value()) != 'F') { throw new IllegalArgumentException("Not an ELF file"); } ei_class = EI_Class.valueOf(fmap.get(ELFIdentification.EI_CLASS.value())); ei_data = EI_Data.valueOf(fmap.get(ELFIdentification.EI_DATA.value())); ei_version = fmap.get(ELFIdentification.EI_VERSION.value()); if (ei_data == EI_Data.ELFDATA2LSB) { fmap.order(ByteOrder.LITTLE_ENDIAN); } else { fmap.order(ByteOrder.BIG_ENDIAN); } fmap.position(ELFIdentification.EI_NIDENT.value()); e_type = E_Type.valueOf(fmap.getShort()); e_machine = E_Machine.valueOf(fmap.getShort()); e_version = E_Version.valueOf(fmap.getInt()); e_entry = fmap.getInt(); e_phoff = fmap.getInt(); e_shoff = fmap.getInt(); e_flags = fmap.getInt(); e_ehsize = fmap.getShort(); e_phentsize = fmap.getShort(); e_phnum = fmap.getShort(); e_shentsize = fmap.getShort(); e_shnum = fmap.getShort(); e_shstrndx = fmap.getShort(); }
@Override public short readShort(long position) throws IOException { return _mmapBuffer.getShort((int)position); } }
@Override public short readShort() { assert buffer != null; short s = buffer.getShort((int) position); position += 2; return s; }
@Override public short readShort(long position) throws IOException { int pos = (int)(position & BUFFER_MASK); int ind = (int)(position >> BUFFER_BITS); return _mmapArray[ind].getShort(pos); }
@Override public short readShort() throws IOException { int pos = (int)(_currentPosition & BUFFER_MASK); int ind = (int)(_currentPosition >> BUFFER_BITS); short val = _mmapArray[ind].getShort(pos); _currentPosition += 2; return val; }
@Override public short readShort(long position) throws IOException { int pos = (int)(position & BUFFER_MASK); int ind = (int)(position >> BUFFER_BITS); return _mmapArray[ind].getShort(pos); }
@Override public short readShort(long position) throws IOException { return _mmapBuffer.getShort((int)position); }
@Override public short readShort(long position) throws IOException { return _mmapBuffer.getShort((int)position); } }
Page(int number, boolean leaf) throws IOException { this.number = number; this.leaf = leaf; this.n = 0; buffer = file.map(MapMode.READ_WRITE, number * pageSize, pageSize); }
public short getShort(long pos) { if (isPageAligned(pos, 2)) return pages[getPage(pos)].getShort(getPageOffset(pos)); int ch1 = get(pos) & 0xff; int ch2 = get(pos + 1) & 0xff; return (short) ((ch1 << 8) + ch2); }
public short getShort(long pos) { if (isPageAligned(pos, 2)) return pages[getPage(pos)].getShort(getPageOffset(pos)); int ch1 = get(pos) & 0xff; int ch2 = get(pos + 1) & 0xff; return (short) ((ch1 << 8) + ch2); }
public short getShort(long pos) { if (isPageAligned(pos, 2)) return pages[getPage(pos)].getShort(getPageOffset(pos)); int ch1 = get(pos) & 0xff; int ch2 = get(pos + 1) & 0xff; return (short) ((ch1 << 8) + ch2); }