public class CASAInputStream extends InputStream
Note that CASAInputStream does not have the reserved node restriction that CASAOutputStream has. That is, all nodes within a file can be read using the CASAInputStream.
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Field and Description |
---|---|
private int |
available |
private int[] |
buffer |
private static int |
BUFFER_LENGTH |
private int |
bufferIndex |
private FilePosition |
initialPosition |
private FilePosition |
lastRead |
private String |
node |
private boolean |
validStream |
Modifier | Constructor and Description |
---|---|
protected |
CASAInputStream(FilePosition pos,
String nodeName) |
|
CASAInputStream(NodePosition pos,
CASAFile file) |
|
CASAInputStream(String nodeName) |
|
CASAInputStream(String nodeName,
CASAFile file) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
private int |
fillBuffer() |
int |
read()
Reads a byte from this input stream.
|
void |
reset() |
mark, markSupported, read, read, skip
private static int BUFFER_LENGTH
private int available
private int[] buffer
private int bufferIndex
private String node
private boolean validStream
private FilePosition lastRead
private FilePosition initialPosition
public CASAInputStream(String nodeName) throws CASAIOException, IOException
CASAIOException
IOException
public CASAInputStream(String nodeName, CASAFile file) throws CASAIOException, IOException
CASAIOException
IOException
public CASAInputStream(NodePosition pos, CASAFile file) throws CASAIOException, IOException
CASAIOException
IOException
protected CASAInputStream(FilePosition pos, String nodeName) throws CASAIOException, IOException
CASAIOException
IOException
private int fillBuffer() throws IOException
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void reset() throws IOException
reset
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException