Package net.mtrop.doom.struct.io
Class PNGContainerReader
java.lang.Object
net.mtrop.doom.struct.io.PNGContainerReader
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCreates a new PNG container reader from a file.Creates a new PNG container reader using an input stream. -
Method Summary
-
Constructor Details
-
PNGContainerReader
Creates a new PNG container reader from a file.- Parameters:
f
- the file to read.- Throws:
IOException
- if a read error occurs or this is not a PNG file.
-
PNGContainerReader
Creates a new PNG container reader using an input stream.- Parameters:
i
- the input stream to read.- Throws:
IOException
- if a read error occurs or this is not PNG data.
-
-
Method Details
-
nextChunk
Reads the next chunk in this container stream.- Returns:
- a new chunk.
- Throws:
IOException
- on a read error.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-