Quadcap Embeddable Server

com.quadcap.io.RandomAccessFileInputStream Class Reference

Inheritance diagram for com.quadcap.io.RandomAccessFileInputStream:

InputStream List of all members.

Detailed Description

This class implements an input stream filter which keeps track of how many bytes have been read.

Author:
Stan Bailes

Definition at line 53 of file RandomAccessFileInputStream.java.

Public Member Functions

 RandomAccessFileInputStream (RandomAccessFile ra)
 Construct a new RandomAccessFileInputStream rearang from the specified file.

int read () throws IOException
 Read the next byte from this input stream.

int read (byte[] buf, int offset, int count) throws IOException
 Read a block of bytes from this input stream.

int read (byte[] buf) throws IOException
 Read a block of bytes from this input stream.

int available () throws IOException
 Return the number of bytes that can be read without blocking.

void close () throws IOException
 Close the stream.

long skip (long n) throws IOException
 Skip ahead in the stream.

void mark (int readLimit)
 Mark the current position in the input stream.

void reset () throws IOException
 Return to the previously marked position in the input stream.

boolean markSupported ()
 Return true if mark/reset supported (they are.).


Package Attributes

long mark = -1
RandomAccessFile ra


Constructor & Destructor Documentation

com.quadcap.io.RandomAccessFileInputStream.RandomAccessFileInputStream RandomAccessFile  ra  ) 
 

Construct a new RandomAccessFileInputStream rearang from the specified file.

Parameters:
ra the file

Definition at line 63 of file RandomAccessFileInputStream.java.


Member Function Documentation

int com.quadcap.io.RandomAccessFileInputStream.available  )  throws IOException
 

Return the number of bytes that can be read without blocking.

Definition at line 101 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

void com.quadcap.io.RandomAccessFileInputStream.close  )  throws IOException
 

Close the stream.

Definition at line 108 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

void com.quadcap.io.RandomAccessFileInputStream.mark int  readLimit  ) 
 

Mark the current position in the input stream.

Definition at line 123 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.mark, and com.quadcap.io.RandomAccessFileInputStream.ra.

boolean com.quadcap.io.RandomAccessFileInputStream.markSupported  ) 
 

Return true if mark/reset supported (they are.).

Definition at line 143 of file RandomAccessFileInputStream.java.

int com.quadcap.io.RandomAccessFileInputStream.read byte[]  buf  )  throws IOException
 

Read a block of bytes from this input stream.

Exceptions:
IOException if an I/O error occcurs.

Definition at line 92 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

int com.quadcap.io.RandomAccessFileInputStream.read byte[]  buf,
int  offset,
int  count
throws IOException
 

Read a block of bytes from this input stream.

Exceptions:
IOException if an I/O error occcurs.

Definition at line 82 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

int com.quadcap.io.RandomAccessFileInputStream.read  )  throws IOException
 

Read the next byte from this input stream.

Exceptions:
IOException if an I/O error occurs.

Definition at line 72 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

void com.quadcap.io.RandomAccessFileInputStream.reset  )  throws IOException
 

Return to the previously marked position in the input stream.

Definition at line 135 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra.

long com.quadcap.io.RandomAccessFileInputStream.skip long  n  )  throws IOException
 

Skip ahead in the stream.

Definition at line 115 of file RandomAccessFileInputStream.java.

References com.quadcap.io.RandomAccessFileInputStream.ra, and com.quadcap.io.RandomAccessFileInputStream.skip().

Referenced by com.quadcap.io.RandomAccessFileInputStream.skip().


Member Data Documentation

long com.quadcap.io.RandomAccessFileInputStream.mark = -1 [package]
 

Definition at line 54 of file RandomAccessFileInputStream.java.

Referenced by com.quadcap.io.RandomAccessFileInputStream.mark().

RandomAccessFile com.quadcap.io.RandomAccessFileInputStream.ra [package]
 

Definition at line 55 of file RandomAccessFileInputStream.java.

Referenced by com.quadcap.io.RandomAccessFileInputStream.available(), com.quadcap.io.RandomAccessFileInputStream.close(), com.quadcap.io.RandomAccessFileInputStream.mark(), com.quadcap.io.RandomAccessFileInputStream.read(), com.quadcap.io.RandomAccessFileInputStream.reset(), and com.quadcap.io.RandomAccessFileInputStream.skip().