| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Storage.ByteArrayFileReader
public class ByteArrayFileReader
Reads in a file contents into a byte array buffers.
$Id: ByteArrayFileReader.java,v 1.5 2008/02/20 07:29:06 mokhov Exp $
| Field Summary | |
|---|---|
protected  byte[][] | 
attBuffers
Buffer of buffers to fill in.  | 
static int | 
DEFAULT_BUFFER_SIZE
Default size of each buffer in bytes.  | 
static int | 
DEFAULT_NUMBER_OF_BUFFERS
Default number of reserved buffers.  | 
protected  int | 
iBufferCount
Contained used buffers count.  | 
protected  int | 
iBufferSize
Current buffer size.  | 
protected  int | 
iFileSize
Contained file size in bytes.  | 
| Constructor Summary | |
|---|---|
ByteArrayFileReader()
Constructs an empty reader.  | 
|
ByteArrayFileReader(java.io.File poFile)
Constructs the reader with the contents of the file by specifying the File object.  | 
|
ByteArrayFileReader(java.io.InputStream poInputStream)
Constructs the reader with the contents of the file by specifying the InputStream object.  | 
|
ByteArrayFileReader(java.io.Reader poReader)
Constructs the reader with the contents of the file by specifying the Reader object.  | 
|
ByteArrayFileReader(java.lang.String pstrFilename)
Constructs the reader with the contents of the file by specifying the filename.  | 
|
ByteArrayFileReader(java.net.URI poURI)
Constructs the reader with the contents of the file by specifying the URI.  | 
|
| Method Summary | |
|---|---|
 int | 
getFileSize()
 | 
 byte[] | 
read(java.io.File poFile)
 | 
 byte[] | 
read(java.io.InputStream poInputStream)
 | 
 byte[] | 
read(java.io.Reader poReader)
 | 
 byte[] | 
read(java.net.URI poURI)
 | 
 byte[] | 
toByteArray()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int DEFAULT_NUMBER_OF_BUFFERS
public static final int DEFAULT_BUFFER_SIZE
protected byte[][] attBuffers
protected int iFileSize
protected int iBufferCount
protected int iBufferSize
| Constructor Detail | 
|---|
public ByteArrayFileReader()
public ByteArrayFileReader(java.lang.String pstrFilename)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
pstrFilename - 
java.io.FileNotFoundException
java.io.IOException
public ByteArrayFileReader(java.io.File poFile)
                    throws java.io.FileNotFoundException,
                           java.io.IOException
poFile - 
java.io.FileNotFoundException
java.io.IOExceptionpublic ByteArrayFileReader(java.net.URI poURI)
poURI - 
public ByteArrayFileReader(java.io.InputStream poInputStream)
                    throws java.io.IOException
poInputStream - 
java.io.IOExceptionpublic ByteArrayFileReader(java.io.Reader poReader)
poReader - | Method Detail | 
|---|
public byte[] read(java.io.File poFile)
            throws java.io.FileNotFoundException,
                   java.io.IOException
poFile - 
java.io.FileNotFoundException
java.io.IOExceptionpublic byte[] read(java.net.URI poURI)
poURI - unused
NotImplementedException
public byte[] read(java.io.InputStream poInputStream)
            throws java.io.IOException
poInputStream - 
java.io.IOExceptionpublic byte[] read(java.io.Reader poReader)
poReader - 
NotImplementedExceptionpublic byte[] toByteArray()
public int getFileSize()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||