|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.fits.InputFactory
public abstract class InputFactory
Represents a sequence of bytes, and can create BasicInput objects to read it.
Constructor Summary | |
---|---|
InputFactory()
|
Method Summary | |
---|---|
static InputFactory |
createFactory(DataSource datsrc,
long offset,
long leng)
Constructs an instance of this class to read a given data source. |
static InputFactory |
createFileFactory(File uncompressedFile,
long offset,
long leng)
Constructs an instance of this class to read a given uncompressed file. |
abstract BasicInput |
createInput(boolean isSeq)
Returns a BasicInput instance to read this object's byte stream. |
static InputFactory |
createSequentialFactory(DataSource datsrc,
long offset,
long leng)
Constructs an instance of this class to read a given data source viewed as a stream, not a file. |
static BasicInput |
createSequentialInput(DataInput in)
Returns a non-random-access BasicInput based on a supplied input stream. |
abstract boolean |
isRandom()
Indicates whether the BasicInput objects created by this factory will support random access. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Closeable |
---|
close |
Constructor Detail |
---|
public InputFactory()
Method Detail |
---|
public abstract boolean isRandom()
public abstract BasicInput createInput(boolean isSeq) throws IOException
isSeq
- if true, the returned object is expected to be used
for sequential access only; this value is a hint
which may or may not be used by the implementation
IOException
public static InputFactory createFactory(DataSource datsrc, long offset, long leng) throws IOException
datsrc
- data sourceoffset
- offset into file of stream startleng
- number of bytes in stream
IOException
public static InputFactory createSequentialFactory(DataSource datsrc, long offset, long leng)
datsrc
- data sourceoffset
- offset into file of stream startleng
- number of bytes in stream
public static InputFactory createFileFactory(File uncompressedFile, long offset, long leng) throws IOException
uncompressedFile
- unencoded fileoffset
- offset into file of stream startleng
- number of bytes in stream
IOException
public static BasicInput createSequentialInput(DataInput in)
in
- input stream
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |