|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.izforge.izpack.io.FileSpanningInputStream
public class FileSpanningInputStream
An inputstream which transparently spans over multiple volumes. The amount of volumes has to be specified
Field Summary | |
---|---|
protected int |
currentvolumeindex
|
private static int |
EOF
|
protected java.io.FileInputStream |
fileinputstream
|
protected long |
filepointer
|
protected byte[] |
magicnumber
|
protected static boolean |
nextvolumenotfound
|
protected java.lang.String |
volumename
|
protected int |
volumestotal
|
protected java.util.zip.GZIPInputStream |
zippedinputstream
|
Constructor Summary | |
---|---|
FileSpanningInputStream(java.io.File volume,
int volumestotal)
|
|
FileSpanningInputStream(java.lang.String volumename,
int volumestotal)
|
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
private boolean |
createInputStreamToNextVolume()
creates an inputstream to the next volume |
long |
getFilepointer()
Returns the current position in the file. |
java.lang.String |
getVolumename()
Returns the name of the volume |
private boolean |
isMagicNumberValid()
checks if the MagicNumber of this stream is valid. |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
setVolumename(java.lang.String volumename)
Sets the volumename |
long |
skip(long n)
|
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int EOF
protected java.io.FileInputStream fileinputstream
protected java.lang.String volumename
protected int currentvolumeindex
protected int volumestotal
protected static boolean nextvolumenotfound
protected long filepointer
protected java.util.zip.GZIPInputStream zippedinputstream
protected byte[] magicnumber
Constructor Detail |
---|
public FileSpanningInputStream(java.io.File volume, int volumestotal) throws java.io.IOException
java.io.IOException
public FileSpanningInputStream(java.lang.String volumename, int volumestotal) throws java.io.IOException
java.io.IOException
Method Detail |
---|
private boolean isMagicNumberValid() throws java.io.IOException
java.io.IOException
private boolean createInputStreamToNextVolume() throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public java.lang.String getVolumename()
public void setVolumename(java.lang.String volumename)
volumename
- public long getFilepointer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |