Class ProxyingInputStream
- java.lang.Object
-
- java.io.InputStream
-
- nonapi.io.github.classgraph.utils.ProxyingInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ProxyingInputStream extends java.io.InputStreamA proxyingInputStreamimplementation that compiles for JDK 7 but can support the methods added in JDK 8 by reflection.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.InputStreaminputStreamprivate static java.lang.reflect.MethodreadAllBytesprivate static java.lang.reflect.MethodreadNBytes1private static java.lang.reflect.MethodreadNBytes3private static java.lang.reflect.MethodskipNBytesprivate static java.lang.reflect.MethodtransferTo
-
Constructor Summary
Constructors Constructor Description ProxyingInputStream(java.io.InputStream inputStream)A proxyingInputStreamimplementation that compiles for JDK 7 but can support the methods added in JDK 8 by reflection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)byte[]readAllBytes()intreadNBytes(byte[] b, int off, int len)byte[]readNBytes(int len)voidreset()longskip(long n)voidskipNBytes(long n)java.lang.StringtoString()longtransferTo(java.io.OutputStream out)
-
-
-
Field Detail
-
inputStream
private java.io.InputStream inputStream
-
readAllBytes
private static java.lang.reflect.Method readAllBytes
-
readNBytes1
private static java.lang.reflect.Method readNBytes1
-
readNBytes3
private static java.lang.reflect.Method readNBytes3
-
skipNBytes
private static java.lang.reflect.Method skipNBytes
-
transferTo
private static java.lang.reflect.Method transferTo
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
readAllBytes
public byte[] readAllBytes() throws java.io.IOException- Overrides:
readAllBytesin classjava.io.InputStream- Throws:
java.io.IOException
-
readNBytes
public byte[] readNBytes(int len) throws java.io.IOException- Overrides:
readNBytesin classjava.io.InputStream- Throws:
java.io.IOException
-
readNBytes
public int readNBytes(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readNBytesin classjava.io.InputStream- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.InputStream
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
skipNBytes
public void skipNBytes(long n) throws java.io.IOException- Throws:
java.io.IOException
-
transferTo
public long transferTo(java.io.OutputStream out) throws java.io.IOException- Overrides:
transferToin classjava.io.InputStream- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-