/** * {@inheritDoc} */ @Override public final IoBuffer limit(int newLimit) { autoExpand(newLimit, 0); buf().limit(newLimit); if (mark > newLimit) { mark = -1; } return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer put(byte b) { autoExpand(1); buf().put(b); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer putUnsigned(byte value) { autoExpand(1); buf().put((byte) (value & 0xff)); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer putUnsigned(int index, short value) { autoExpand(index, 1); buf().put(index, (byte) (value & 0x00ff)); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer putUnsigned(int value) { autoExpand(1); buf().put((byte) (value & 0x000000ff)); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer putUnsigned(int index, int value) { autoExpand(index, 1); buf().put(index, (byte) (value & 0x000000ff)); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer put(byte[] src, int offset, int length) { autoExpand(length); buf().put(src, offset, length); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putChar(int index, char value) { autoExpand(index, 2); buf().putChar(index, value); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putFloat(int index, float value) { autoExpand(index, 4); buf().putFloat(index, value); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putDouble(int index, double value) { autoExpand(index, 8); buf().putDouble(index, value); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putUnsignedInt(long value) { autoExpand(4); buf().putInt((int) (value & 0x00000000ffffffff)); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putUnsignedShort(long value) { autoExpand(2); buf().putShort((short) (value)); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putDouble(double value) { autoExpand(8); buf().putDouble(value); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer putUnsigned(int index, short value) { autoExpand(index, 1); buf().put(index, (byte) (value & 0x00ff)); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putChar(int index, char value) { autoExpand(index, 2); buf().putChar(index, value); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putShort(short value) { autoExpand(2); buf().putShort(value); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putUnsignedInt(long value) { autoExpand(4); buf().putInt((int) (value & 0x00000000ffffffff)); return this; }
/** * {@inheritDoc} */ @Override public final IoBuffer putUnsignedShort(long value) { autoExpand(2); buf().putShort((short) (value)); return this; }
/** * {@inheritDoc} */ @Override public IoBuffer skip(int size) { autoExpand(size); return position(position() + size); }
/** * {@inheritDoc} */ @Override public IoBuffer skip(int size) { autoExpand(size); return position(position() + size); }