Home | History | Annotate | Download | only in util

Lines Matching refs:off

122      * @param off {@code >= 0, < size();} offset to fetch
125 public int getByte(int off) {
126 checkOffsets(off, off + 1);
127 return getByte0(off);
133 * @param off {@code >= 0, < (size() - 1);} offset to fetch
136 public int getShort(int off) {
137 checkOffsets(off, off + 2);
138 return (getByte0(off) << 8) | getUnsignedByte0(off + 1);
144 * @param off {@code >= 0, < (size() - 3);} offset to fetch
147 public int getInt(int off) {
148 checkOffsets(off, off + 4);
149 return (getByte0(off) << 24) |
150 (getUnsignedByte0(off + 1) << 16) |
151 (getUnsignedByte0(off + 2) << 8) |
152 getUnsignedByte0(off + 3);
158 * @param off {@code >= 0, < (size() - 7);} offset to fetch
161 public long getLong(int off) {
162 checkOffsets(off, off + 8);
163 int part1 = (getByte0(off) << 24) |
164 (getUnsignedByte0(off + 1) << 16) |
165 (getUnsignedByte0(off + 2) << 8) |
166 getUnsignedByte0(off + 3);
167 int part2 = (getByte0(off + 4) << 24) |
168 (getUnsignedByte0(off + 5) << 16) |
169 (getUnsignedByte0(off + 6) << 8) |
170 getUnsignedByte0(off + 7);
178 * @param off {@code >= 0, < size();} offset to fetch
181 public int getUnsignedByte(int off) {
182 checkOffsets(off, off + 1);
183 return getUnsignedByte0(off);
189 * @param off {@code >= 0, < (size() - 1);} offset to fetch
192 public int getUnsignedShort(int off) {
193 checkOffsets(off, off + 2);
194 return (getUnsignedByte0(off) << 8) | getUnsignedByte0(off + 1);
232 * @param off offset to fetch
235 private int getByte0(int off) {
236 return bytes[start + off];
243 * @param off offset to fetch
246 private int getUnsignedByte0(int off) {
247 return bytes[start + off] & 0xff;