FileDocCategorySizeDatePackage
ReadOnlyHeapByteBuffer.javaAPI DocAndroid 1.5 API3967Wed May 06 22:41:04 BST 2009java.nio

ReadOnlyHeapByteBuffer

public final class ReadOnlyHeapByteBuffer extends HeapByteBuffer
HeapByteBuffer, ReadWriteHeapByteBuffer and ReadOnlyHeapByteBuffer compose the implementation of array based byte buffers.

ReadOnlyHeapByteBuffer extends HeapByteBuffer with all the write methods throwing read only exception.

This class is marked final for runtime performance.

Fields Summary
Constructors Summary
ReadOnlyHeapByteBuffer(byte[] backingArray, int capacity, int arrayOffset)

        super(backingArray, capacity, arrayOffset);
    
Methods Summary
public java.nio.ByteBufferasReadOnlyBuffer()

        return copy(this, mark);
    
public java.nio.ByteBuffercompact()

        throw new ReadOnlyBufferException();
    
static java.nio.ReadOnlyHeapByteBuffercopy(java.nio.HeapByteBuffer other, int markOfOther)

        ReadOnlyHeapByteBuffer buf = new ReadOnlyHeapByteBuffer(
                other.backingArray, other.capacity(), other.offset);
        buf.limit = other.limit();
        buf.position = other.position();
        buf.mark = markOfOther;
        buf.order(other.order());
        return buf;
    
public java.nio.ByteBufferduplicate()

        return copy(this, mark);
    
public booleanisReadOnly()

        return true;
    
protected byte[]protectedArray()

        throw new ReadOnlyBufferException();
    
protected intprotectedArrayOffset()

        throw new ReadOnlyBufferException();
    
protected booleanprotectedHasArray()

        return false;
    
public java.nio.ByteBufferput(byte b)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferput(int index, byte b)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferput(byte[] src, int off, int len)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferput(java.nio.ByteBuffer buf)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputDouble(double value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputDouble(int index, double value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputFloat(float value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputFloat(int index, float value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputInt(int value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputInt(int index, int value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputLong(int index, long value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputLong(long value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputShort(int index, short value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferputShort(short value)

        throw new ReadOnlyBufferException();
    
public java.nio.ByteBufferslice()

        ReadOnlyHeapByteBuffer slice = new ReadOnlyHeapByteBuffer(backingArray,
                remaining(), offset + position);
        slice.order = order;
        return slice;