Class TarOutputStream
java.lang.Object
java.io.OutputStream
com.codename1.io.BufferedOutputStream
com.codename1.io.tar.TarOutputStream
- All Implemented Interfaces:
Closeable, Flushable, 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
Appends the EOF record and closes the stream
See also
- java.io.FilterOutputStream#close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classBufferedOutputStream- Throws:
IOException
-
write
Writes a byte to the stream and updates byte counters
See also
- java.io.FilterOutputStream#write(int)
- Overrides:
writein classBufferedOutputStream- Throws:
IOException
-
write
Checks if the bytes being written exceed the current entry size.
See also
- java.io.FilterOutputStream#write(byte[], int, int)
- Overrides:
writein classBufferedOutputStream- Throws:
IOException
-
putNextEntry
Writes the next tar entry header on the stream
Parameters
entry
Throws
IOException
- Throws:
IOException
-
closeCurrentEntry
Closes the current tar entry
Throws
IOException
- Throws:
IOException
-
pad
Pads the last content block
Throws
IOException
- Throws:
IOException
-