/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** * Gets the array. The returned array contains exactly the data * written (e.g. no leftover space at the end). */ public short[] getArray() { int cursor = cursor(); if (cursor == array.length) { return array; } short[] result = new short[cursor]; System.arraycopy(array, 0, result, 0, cursor); return result; }
/** {@inheritDoc} */ @Override public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** @inheritDoc */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** {@inheritDoc} */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** @inheritDoc */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** @inheritDoc */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** {@inheritDoc} */ @Override public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }
/** @inheritDoc */ public void write(short codeUnit) { array[cursor()] = codeUnit; advance(1); }