Home | History | Annotate | Download | only in util

Lines Matching refs:off

119      * @param off {@code >= 0, < size();} offset to fetch
122 public int getByte(int off) {
123 checkOffsets(off, off + 1);
124 return getByte0(off);
130 * @param off {@code >= 0, < (size() - 1);} offset to fetch
133 public int getShort(int off) {
134 checkOffsets(off, off + 2);
135 return (getByte0(off) << 8) | getUnsignedByte0(off + 1);
141 * @param off {@code >= 0, < (size() - 3);} offset to fetch
144 public int getInt(int off) {
145 checkOffsets(off, off + 4);
146 return (getByte0(off) << 24) |
147 (getUnsignedByte0(off + 1) << 16) |
148 (getUnsignedByte0(off + 2) << 8) |
149 getUnsignedByte0(off + 3);
155 * @param off {@code >= 0, < (size() - 7);} offset to fetch
158 public long getLong(int off) {
159 checkOffsets(off, off + 8);
160 int part1 = (getByte0(off) << 24) |
161 (getUnsignedByte0(off + 1) << 16) |
162 (getUnsignedByte0(off + 2) << 8) |
163 getUnsignedByte0(off + 3);
164 int part2 = (getByte0(off + 4) << 24) |
165 (getUnsignedByte0(off + 5) << 16) |
166 (getUnsignedByte0(off + 6) << 8) |
167 getUnsignedByte0(off + 7);
175 * @param off {@code >= 0, < size();} offset to fetch
178 public int getUnsignedByte(int off) {
179 checkOffsets(off, off + 1);
180 return getUnsignedByte0(off);
186 * @param off {@code >= 0, < (size() - 1);} offset to fetch
189 public int getUnsignedShort(int off) {
190 checkOffsets(off, off + 2);
191 return (getUnsignedByte0(off) << 8) | getUnsignedByte0(off + 1);
229 * @param off offset to fetch
232 private int getByte0(int off) {
233 return bytes[start + off];
240 * @param off offset to fetch
243 private int getUnsignedByte0(int off) {
244 return bytes[start + off] & 0xff;