/** * @param arr Array. * @param off Offset. * @return Value. */ public static char readChar(byte[] arr, int off) { long pos = GridUnsafe.BYTE_ARR_OFF + off; return BIG_ENDIAN ? GridUnsafe.getCharLE(arr, pos): GridUnsafe.getChar(arr, pos); }
/** {@inheritDoc} */ @Override public char readChar() { lastFinished = buf.remaining() >= 2; if (lastFinished) { int pos = buf.position(); buf.position(pos + 2); return GridUnsafe.getChar(heapArr, baseOff + pos); } else return 0; }
/** {@inheritDoc} */ @Override protected char readCharFast() { long off = GridUnsafe.BYTE_ARR_OFF + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(data, off) : GridUnsafe.getChar(data, off); }
/** {@inheritDoc} */ @Override public char getChar(int idx) { ensure(idx, 2); return GridUnsafe.getChar(ptr + idx); }
/** * @param ptr Pointer. * @param off Offset. * @return Value. */ public static char readChar(long ptr, int off) { long addr = ptr + off; return BIG_ENDIAN ? GridUnsafe.getCharLE(addr) : GridUnsafe.getChar(addr); }
/** {@inheritDoc} */ @Override public char readChar() throws IOException { checkRange(2); char res = GridUnsafe.getChar(buf, BYTE_ARR_OFF + pos); pos += 2; return res; }
/** {@inheritDoc} */ @Override protected char readCharFast() { long addr = ptr + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(addr) : GridUnsafe.getChar(addr); }
/** {@inheritDoc} */ @Override public char readChar() { ensureEnoughData(2); char res = GridUnsafe.getChar(data + pos); shift(2); return res; }
/** {@inheritDoc} */ @Override public char readChar() { lastFinished = buf.remaining() >= 2; if (lastFinished) { int pos = buf.position(); buf.position(pos + 2); long off = baseOff + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(heapArr, off) : GridUnsafe.getChar(heapArr, off); } else return 0; }
/** {@inheritDoc} */ @Override public char readChar() { lastFinished = buf.remaining() >= 2; if (lastFinished) { int pos = buf.position(); buf.position(pos + 2); return GridUnsafe.getChar(heapArr, baseOff + pos); } else return 0; }
/** {@inheritDoc} */ @Override public char readChar() throws IOException { fromStream(2); long off = BYTE_ARR_OFF + this.off; char v = BIG_ENDIAN ? GridUnsafe.getCharLE(buf, off) : GridUnsafe.getChar(buf, off); offset(2); return v; }
/** {@inheritDoc} */ @Override public char readChar() { ensureEnoughData(2); char res = GridUnsafe.getChar(data + pos); shift(2); return res; }
/** * @param ptr Pointer. * @param off Offset. * @return Value. */ public static char readChar(long ptr, int off) { long addr = ptr + off; return BIG_ENDIAN ? GridUnsafe.getCharLE(addr) : GridUnsafe.getChar(addr); }
/** {@inheritDoc} */ @Override protected char readCharFast() { long off = GridUnsafe.BYTE_ARR_OFF + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(data, off) : GridUnsafe.getChar(data, off); }
/** * @param arr Array. * @param off Offset. * @return Value. */ public static char readChar(byte[] arr, int off) { long pos = GridUnsafe.BYTE_ARR_OFF + off; return BIG_ENDIAN ? GridUnsafe.getCharLE(arr, pos): GridUnsafe.getChar(arr, pos); }
/** {@inheritDoc} */ @Override protected char readCharFast() { long addr = ptr + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(addr) : GridUnsafe.getChar(addr); }
/** {@inheritDoc} */ @Override public char readChar() { lastFinished = buf.remaining() >= 2; if (lastFinished) { int pos = buf.position(); buf.position(pos + 2); long off = baseOff + pos; return BIG_ENDIAN ? GridUnsafe.getCharLE(heapArr, off) : GridUnsafe.getChar(heapArr, off); } else return 0; }
/** {@inheritDoc} */ @Override public char readChar() throws IOException { fromStream(2); long off = BYTE_ARR_OFF + this.off; char v = BIG_ENDIAN ? GridUnsafe.getCharLE(buf, off) : GridUnsafe.getChar(buf, off); offset(2); return v; }