Lines Matching refs:offset
71 public int getByte(int offset) throws InvalidIndex {
72 if (offset < 0 || offset >= code.length)
73 throw new InvalidIndex(offset);
74 return code[offset];
77 public int getUnsignedByte(int offset) throws InvalidIndex {
78 if (offset < 0 || offset >= code.length)
79 throw new InvalidIndex(offset);
80 return code[offset] & 0xff;
83 public int getShort(int offset) throws InvalidIndex {
84 if (offset < 0 || offset + 1 >= code.length)
85 throw new InvalidIndex(offset);
86 return (code[offset] << 8) | (code[offset + 1] & 0xFF);
89 public int getUnsignedShort(int offset) throws InvalidIndex {
90 if (offset < 0 || offset + 1 >= code.length)
91 throw new InvalidIndex(offset);
92 return ((code[offset] << 8) | (code[offset + 1] & 0xFF)) & 0xFFFF;
95 public int getInt(int offset) throws InvalidIndex {
96 if (offset < 0 || offset + 3 >= code.length)
97 throw new InvalidIndex(offset);
98 return (getShort(offset) << 16) | (getShort(offset + 2) & 0xFFFF);