Package ghidra.app.util.bin
Class ByteProviderPaddedInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- ghidra.app.util.bin.ByteProviderPaddedInputStream
 
 
- 
- All Implemented Interfaces:
- java.io.Closeable,- java.lang.AutoCloseable
 
 public class ByteProviderPaddedInputStream extends java.io.InputStreamWraps aByteProviderand presents it as anInputStream.This InputStream will be limited to a region of the underlying ByteProvider, and has an optional amount of padding at the end of the stream where the stream will appear to have bytes with a value of zero. 
- 
- 
Constructor SummaryConstructors Constructor Description ByteProviderPaddedInputStream(ByteProvider provider, long startOffset, long length, long padCount)Create a newByteProviderInputStreaminstance, using the specifiedByteProvideras the source of the bytes returned from this stream.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()intread()
 
- 
- 
- 
Constructor Detail- 
ByteProviderPaddedInputStreampublic ByteProviderPaddedInputStream(ByteProvider provider, long startOffset, long length, long padCount) Create a newByteProviderInputStreaminstance, using the specifiedByteProvideras the source of the bytes returned from this stream.The source ByteProvider is not closed when this stream is closed. The total number of bytes that can be read from this instance will be length + padCount. - Parameters:
- provider- the- ByteProviderto wrap.
- startOffset- the starting offset in the ByteProvider.
- length- the number of bytes from the- ByteProviderto allow to be read by this InputStream.
- padCount- the number of fake zero bytes to add after the real- lengthbytes.
 
 
- 
 - 
Method Detail- 
closepublic void close() - Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.io.Closeable
- Overrides:
- closein class- java.io.InputStream
 
 - 
readpublic int read() throws java.io.IOException- Specified by:
- readin class- java.io.InputStream
- Throws:
- java.io.IOException
 
 - 
availablepublic int available() - Overrides:
- availablein class- java.io.InputStream
 
 
- 
 
-