Class TarOutputStream
java.lang.Object
java.io.OutputStream
com.codename1.io.BufferedOutputStream
com.codename1.io.tar.TarOutputStream
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields inherited from class BufferedOutputStream
buf, count -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Appends the EOF record and closes the streamprotected voidCloses the current tar entryprotected voidpad()Pads the last content blockvoidputNextEntry(TarEntry entry) Writes the next tar entry header on the streamvoidwrite(byte[] b, int off, int len) Checks if the bytes being written exceed the current entry size.voidwrite(int b) Writes a byte to the stream and updates byte countersMethods inherited from class BufferedOutputStream
flush, flushBuffer, getConnection, getDefaultBufferSize, getLastActivityTime, getName, getTotalBytesWritten, setConnection, setDefaultBufferSize, setProgressListener, write
-
Constructor Details
-
TarOutputStream
-
-
Method Details
-
close
public void close() throws java.io.IOExceptionAppends the EOF record and closes the stream
See also
- java.io.FilterOutputStream#close()
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classBufferedOutputStream- Throws:
java.io.IOException
-
write
public void write(int b) throws java.io.IOException Writes a byte to the stream and updates byte counters
See also
- java.io.FilterOutputStream#write(int)
- Overrides:
writein classBufferedOutputStream- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException Checks if the bytes being written exceed the current entry size.
See also
- java.io.FilterOutputStream#write(byte[], int, int)
- Overrides:
writein classBufferedOutputStream- Throws:
java.io.IOException
-
putNextEntry
Writes the next tar entry header on the stream
Parameters
entry
Throws
IOException
- Throws:
java.io.IOException
-
closeCurrentEntry
protected void closeCurrentEntry() throws java.io.IOExceptionCloses the current tar entry
Throws
IOException
- Throws:
java.io.IOException
-
pad
protected void pad() throws java.io.IOExceptionPads the last content block
Throws
IOException
- Throws:
java.io.IOException
-