Package aQute.lib.putjar
Class DirectoryInputStream
java.lang.Object
java.io.InputStream
aQute.lib.putjar.DirectoryInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) InputStream
(package private) static final int
(package private) ByteArrayOutputStream
(package private) static final int
(package private) File
(package private) int
(package private) static final InputStream
(package private) static final int
(package private) final FileIterator
(package private) static final int
(package private) final File
(package private) static final int
(package private) int
(package private) long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate CRC32
(package private) InputStream
end of central dir signature 4 bytes (0x06054b50) number of this disk 2 bytes number of the disk with the start of the central directory 2 bytes total number of entries in the central directory on this disk 2 bytes total number of entries in the central directory 2 bytes size of the central directory 4 bytes offset of start of central directory with respect to the starting disk number 4 bytes .ZIP file comment length 2 bytes .ZIP file comment (variable size)private InputStream
Local file header:private String
(package private) void
next()
private void
int
read()
private void
writeInt
(OutputStream out, int v) private void
writeShort
(OutputStream out, int v) Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
BUFFER_SIZE
static final int BUFFER_SIZE- See Also:
-
root
-
fi
-
element
File element -
entries
int entries -
state
int state -
where
long where -
START
static final int START- See Also:
-
HEADER
static final int HEADER- See Also:
-
DATA
static final int DATA- See Also:
-
DIRECTORY
static final int DIRECTORY- See Also:
-
EOF
static final int EOF- See Also:
-
eof
-
directory
ByteArrayOutputStream directory -
current
InputStream current
-
-
Constructor Details
-
DirectoryInputStream
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
next
- Throws:
IOException
-
nextHeader
- Throws:
IOException
-
getDirectory
end of central dir signature 4 bytes (0x06054b50) number of this disk 2 bytes number of the disk with the start of the central directory 2 bytes total number of entries in the central directory on this disk 2 bytes total number of entries in the central directory 2 bytes size of the central directory 4 bytes offset of start of central directory with respect to the starting disk number 4 bytes .ZIP file comment length 2 bytes .ZIP file comment (variable size)
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
getHeader
Local file header:local file header signature 4 bytes (0x04034b50) version needed to extract 2 bytes general purpose bit flag 2 bytes compression method 2 bytes last mod file time 2 bytes last mod file date 2 bytes crc-32 4 bytes compressed size 4 bytes uncompressed size 4 bytes file name length 2 bytes extra field length 2 bytes file name (variable size) extra field (variable size) central file header signature 4 bytes (0x02014b50) version made by 2 bytes version needed to extract 2 bytes general purpose bit flag 2 bytes compression method 2 bytes last mod file time 2 bytes last mod file date 2 bytes crc-32 4 bytes compressed size 4 bytes uncompressed size 4 bytes file name length 2 bytes extra field length 2 bytes file comment length 2 bytes disk number start 2 bytes internal file attributes 2 bytes external file attributes 4 bytes relative offset of local header 4 bytes file name (variable size) extra field (variable size) file comment (variable size)
- Throws:
IOException
-
getPath
-
getCRC
- Throws:
IOException
-