net.metanotion.io
Class JNLPRandomAccess

java.lang.Object
  extended by net.metanotion.io.JNLPRandomAccess
All Implemented Interfaces:
Closeable, Flushable

public final class JNLPRandomAccess
extends Object
implements Flushable, Closeable

Adapter to convert a net.metantion.io.RandomAccess into a javax.jnlp.RandomAccessFile.


Constructor Summary
JNLPRandomAccess(RandomAccess raf)
           
 
Method Summary
 boolean atEOF()
           
 void close()
           
 void flush()
           
 long getFilePointer()
           
 long length()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int offset, int length)
           
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
           
 String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
 void seek(long pos)
           
 void setLength(long newLength)
           
 int skipBytes(int n)
           
 void write(byte[] b)
           
 void write(byte[] b, int offset, int length)
           
 void write(int b)
           
 void writeBoolean(boolean b)
           
 void writeByte(int b)
           
 void writeBytes(String s)
           
 void writeChar(int c)
           
 void writeChars(String str)
           
 void writeDouble(double d)
           
 void writeFloat(float f)
           
 void writeInt(int i)
           
 void writeLong(long l)
           
 void writeShort(int v)
           
 void writeUTF(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNLPRandomAccess

public JNLPRandomAccess(RandomAccess raf)
Method Detail

getFilePointer

public long getFilePointer()

seek

public void seek(long pos)

length

public long length()

setLength

public void setLength(long newLength)

close

public void close()
Specified by:
close in interface Closeable

flush

public void flush()
Specified by:
flush in interface Flushable

read

public int read(byte[] b)

read

public int read(byte[] b,
                int offset,
                int length)

readByte

public byte readByte()

read

public int read()

readUTF

public String readUTF()

readLine

public String readLine()

readInt

public int readInt()

readLong

public long readLong()

readShort

public short readShort()

readDouble

public double readDouble()

readFloat

public float readFloat()

readChar

public char readChar()

readUnsignedShort

public int readUnsignedShort()

readUnsignedByte

public int readUnsignedByte()

readBoolean

public boolean readBoolean()

readFully

public void readFully(byte[] b)

readFully

public void readFully(byte[] b,
                      int off,
                      int len)

atEOF

public boolean atEOF()

skipBytes

public int skipBytes(int n)

write

public void write(byte[] b)

write

public void write(byte[] b,
                  int offset,
                  int length)

write

public void write(int b)

writeShort

public void writeShort(int v)

writeBoolean

public void writeBoolean(boolean b)

writeByte

public void writeByte(int b)

writeBytes

public void writeBytes(String s)

writeDouble

public void writeDouble(double d)

writeFloat

public void writeFloat(float f)

writeLong

public void writeLong(long l)

writeInt

public void writeInt(int i)

writeChar

public void writeChar(int c)

writeChars

public void writeChars(String str)

writeUTF

public void writeUTF(String str)
              throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException