Module openj9.dtfj
Class AddressSpaceImageInputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
com.ibm.dtfj.corereaders.zos.dumpreader.AddressSpaceImageInputStream
- All Implemented Interfaces:
- Closeable,- DataInput,- AutoCloseable,- ImageInputStream
This class implements ImageInputStream for an AddressSpace. You can use this to read data from
 an AddressSpace as an alternative to using the methods defined in AddressSpace itself.
 ImageInputStream provides a rich set of read methods. To use it you must first call seek() with
 the address you wish to read from and then call the appropriate read method.
 
Note that at present it doesn't fully meet the ImageInputStream semantics in that it won't skip over gaps in the AddressSpace seamlessly. I might add that functionality if the demand is there. Also length returns -1 since it doesn't make sense to return a real value (?).
- 
Field SummaryFields declared in class javax.imageio.stream.ImageInputStreamImplbitOffset, byteOrder, flushedPos, streamPos
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new AddressSpaceImageInputStream for the given AddressSpace.
- 
Method SummaryModifier and TypeMethodDescriptionintread()Read a byte from the current position.intread(byte[] b, int off, int len) Read some bytes from the current position and add len to streamPos.intreadInt()Read an int from the current position.longreadLong()Read a long from the current position.longRead an unsigned int from the current position.Methods declared in class javax.imageio.stream.ImageInputStreamImplcheckClosed, close, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, length, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readLine, readShort, readUnsignedByte, readUnsignedShort, readUTF, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
- 
Constructor Details- 
AddressSpaceImageInputStreamCreate a new AddressSpaceImageInputStream for the given AddressSpace.- Parameters:
- space- the AddressSpace which this stream reads
 
 
- 
- 
Method Details- 
readRead a byte from the current position. Also increments streamPos.- Specified by:
- readin interface- ImageInputStream
- Specified by:
- readin class- ImageInputStreamImpl
- Returns:
- the value of the next byte in the stream, or -1if EOF is reached.
- Throws:
- IOException- if the stream has been closed.
 
- 
readRead some bytes from the current position and add len to streamPos.- Specified by:
- readin interface- ImageInputStream
- Specified by:
- readin class- ImageInputStreamImpl
- Parameters:
- b- an array of bytes to be written to.
- off- the starting position within- bto write to.
- len- the maximum number of bytes to read.
- Returns:
- the number of bytes actually read, or -1to indicate EOF.
- Throws:
- IOException- if an I/O error occurs.
 
- 
readIntRead an int from the current position. Also increments streamPos. For efficiency to avoid multiple reads via ImageInputStream- Specified by:
- readIntin interface- DataInput
- Specified by:
- readIntin interface- ImageInputStream
- Overrides:
- readIntin class- ImageInputStreamImpl
- Returns:
- a signed int value from the stream.
- Throws:
- IOException- if an I/O error occurs.
- See Also:
 
- 
readUnsignedIntRead an unsigned int from the current position. Also increments streamPos. For efficiency to avoid multiple reads via ImageInputStream- Specified by:
- readUnsignedIntin interface- ImageInputStream
- Overrides:
- readUnsignedIntin class- ImageInputStreamImpl
- Returns:
- an unsigned int value from the stream, as a long.
- Throws:
- IOException- if an I/O error occurs.
- See Also:
 
- 
readLongRead a long from the current position. Also increments streamPos. For efficiency to avoid multiple reads via ImageInputStream- Specified by:
- readLongin interface- DataInput
- Specified by:
- readLongin interface- ImageInputStream
- Overrides:
- readLongin class- ImageInputStreamImpl
- Returns:
- a signed long value from the stream.
- Throws:
- IOException- if an I/O error occurs.
- See Also:
 
 
-