Methods Summary |
---|
public void | addressValidityCheck()
if (byteBuffer instanceof DirectBuffer) {
((DirectBuffer)byteBuffer).addressValidityCheck();
} else {
assert false : byteBuffer;
}
|
public java.nio.CharBuffer | asReadOnlyBuffer()
CharToByteBufferAdapter buf = new CharToByteBufferAdapter(byteBuffer
.asReadOnlyBuffer());
buf.limit = limit;
buf.position = position;
buf.mark = mark;
return buf;
|
public java.nio.CharBuffer | compact()
if (byteBuffer.isReadOnly()) {
throw new ReadOnlyBufferException();
}
byteBuffer.limit(limit << 1);
byteBuffer.position(position << 1);
byteBuffer.compact();
byteBuffer.clear();
position = limit - position;
limit = capacity;
mark = UNSET_MARK;
return this;
|
public java.nio.CharBuffer | duplicate()
CharToByteBufferAdapter buf = new CharToByteBufferAdapter(byteBuffer
.duplicate());
buf.limit = limit;
buf.position = position;
buf.mark = mark;
return buf;
|
public void | free()
if (byteBuffer instanceof DirectBuffer) {
((DirectBuffer)byteBuffer).free();
} else {
assert false : byteBuffer;
}
|
public char | get()
if (position == limit) {
throw new BufferUnderflowException();
}
return byteBuffer.getChar(position++ << 1);
|
public char | get(int index)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
return byteBuffer.getChar(index << 1);
|
public org.apache.harmony.luni.platform.PlatformAddress | getBaseAddress()
if (byteBuffer instanceof DirectBuffer) {
return ((DirectBuffer)byteBuffer).getBaseAddress();
} else {
assert false : byteBuffer;
return null;
}
|
public int | getByteCapacity()
if (byteBuffer instanceof DirectBuffer) {
return ((DirectBuffer)byteBuffer).getByteCapacity();
} else {
assert false : byteBuffer;
return -1;
}
|
public org.apache.harmony.luni.platform.PlatformAddress | getEffectiveAddress()
if (byteBuffer instanceof DirectBuffer) {
return ((DirectBuffer)byteBuffer).getEffectiveAddress();
} else {
assert false : byteBuffer;
return null;
}
|
public boolean | isAddressValid()
if (byteBuffer instanceof DirectBuffer) {
return ((DirectBuffer)byteBuffer).isAddressValid();
} else {
assert false : byteBuffer;
return false;
}
|
public boolean | isDirect()
return byteBuffer.isDirect();
|
public boolean | isReadOnly()
return byteBuffer.isReadOnly();
|
public java.nio.ByteOrder | order()
return byteBuffer.order();
|
protected char[] | protectedArray()
throw new UnsupportedOperationException();
|
protected int | protectedArrayOffset()
throw new UnsupportedOperationException();
|
protected boolean | protectedHasArray()
return false;
|
public java.nio.CharBuffer | put(char c)
if (position == limit) {
throw new BufferOverflowException();
}
byteBuffer.putChar(position++ << 1, c);
return this;
|
public java.nio.CharBuffer | put(int index, char c)
if (index < 0 || index >= limit) {
throw new IndexOutOfBoundsException();
}
byteBuffer.putChar(index << 1, c);
return this;
|
public java.nio.CharBuffer | slice()
byteBuffer.limit(limit << 1);
byteBuffer.position(position << 1);
CharBuffer result = new CharToByteBufferAdapter(byteBuffer.slice());
byteBuffer.clear();
return result;
|
public java.lang.CharSequence | subSequence(int start, int end)
if (start < 0 || end < start || end > remaining()) {
throw new IndexOutOfBoundsException();
}
CharBuffer result = duplicate();
result.limit(position + end);
result.position(position + start);
return result;
|
static java.nio.CharBuffer | wrap(java.nio.ByteBuffer byteBuffer)
return new CharToByteBufferAdapter(byteBuffer.slice());
|