Class TarInputStream
java.lang.Object
java.io.InputStream
com.codename1.io.BufferedInputStream
com.codename1.io.tar.TarInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCloses the current tar entryReturns the next entry in the tar filebooleanvoidmark(int readlimit) Not supportedbooleanTests if this input stream supports themarkandresetmethods.intread()Read a byteintread(byte[] b, int off, int len) Checks if the bytes being read exceed the entry size and adjusts the byte array length.voidreset()Not supportedvoidsetDefaultSkip(boolean defaultSkip) longskip(long n) Skips 'n' bytes on the InputStreamprotected voidskipPad()Skips the pad at the end of each tar entry file contentMethods inherited from class BufferedInputStream
available, close, getConnection, getDefaultBufferSize, getInternal, getLastActivityTime, getName, getTotalBytesRead, getYield, isDisableBuffering, isPrintInput, read, setConnection, setDefaultBufferSize, setDisableBuffering, setPrintInput, setProgressListener, setYield, stop
-
Constructor Details
-
TarInputStream
-
-
Method Details
-
markSupported
public boolean markSupported()Description copied from class:BufferedInputStreamTests if this input stream supports the
markandresetmethods. ThemarkSupportedmethod ofBufferedInputStreamreturnstrue.Returns
- Overrides:
markSupportedin classBufferedInputStream- Returns:
a
booleanindicating if this stream type supports themarkandresetmethods.See also
-
java.io.InputStream#mark(int)
-
java.io.InputStream#reset()
-
-
mark
-
reset
Not supported- Overrides:
resetin classBufferedInputStream- Throws:
IOException
-
read
Read a byte
See also
- java.io.FilterInputStream#read()
- Overrides:
readin classBufferedInputStream- Returns:
the next byte of data, or
-1if the end of the stream is reached.Throws
IOException: @throws IOException if this input stream has been closed by invoking its#close()method, or an I/O error occurs.
- Throws:
IOException
-
read
Checks if the bytes being read exceed the entry size and adjusts the byte array length. Updates the byte counters
See also
- java.io.FilterInputStream#read(byte[], int, int)
- Overrides:
readin classBufferedInputStream- Returns:
the number of bytes read, or
-1if the end of the stream has been reached.Throws
IOException: @throws IOException if this input stream has been closed by invoking its#close()method, or an I/O error occurs.
- Throws:
IOException
-
getNextEntry
Returns the next entry in the tar file
Returns
TarEntry
Throws
IOException
- Throws:
IOException
-
closeCurrentEntry
Closes the current tar entry
Throws
IOException
- Throws:
IOException
-
skipPad
Skips the pad at the end of each tar entry file content
Throws
IOException
- Throws:
IOException
-
skip
Skips 'n' bytes on the InputStream
Overrides default implementation of skip
- Overrides:
skipin classBufferedInputStream- Throws:
IOException
-
isDefaultSkip
public boolean isDefaultSkip() -
setDefaultSkip
public void setDefaultSkip(boolean defaultSkip)
-