FileDocCategorySizeDatePackage
ReadOnlyDirectByteBuffer.javaAPI DocAndroid 1.5 API3986Wed May 06 22:41:04 BST 2009java.nio

ReadOnlyDirectByteBuffer

public final class ReadOnlyDirectByteBuffer extends DirectByteBuffer
DirectByteBuffer, ReadWriteDirectByteBuffer and ReadOnlyDirectByteBuffer compose the implementation of platform memory based byte buffers.

ReadOnlyDirectByteBuffer extends DirectByteBuffer with all the write methods throwing read only exception.

This class is marked final for runtime performance.

Fields Summary
Constructors Summary
protected ReadOnlyDirectByteBuffer(SafeAddress address, int capacity, int offset)

        super(address, capacity, offset);
    
protected ReadOnlyDirectByteBuffer(org.apache.harmony.luni.platform.PlatformAddress address, int capacity, int offset)

        super(new SafeAddress(address), capacity, offset);
    
Methods Summary
public java.nio.ByteBufferasReadOnlyBuffer()

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

        throw new ReadOnlyBufferException();
    
static java.nio.ReadOnlyDirectByteBuffercopy(java.nio.DirectByteBuffer other, int markOfOther)

        ReadOnlyDirectByteBuffer buf = new ReadOnlyDirectByteBuffer(
                other.safeAddress, 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;
    
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.ByteBufferput(byte value)

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

        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()

        ReadOnlyDirectByteBuffer buf = new ReadOnlyDirectByteBuffer(
                safeAddress, remaining(), offset + position);
        buf.order = order;
        return buf;