public final class EmptyInputStream extends InputStream
Modifier and Type | Field and Description |
---|---|
static EmptyInputStream |
INSTANCE
Singleton instance of EmptyInputStream.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns
0 . |
void |
close()
Noop.
|
void |
mark(int readLimit)
Noop.
|
boolean |
markSupported()
Returns
true . |
int |
read()
Returns
-1 . |
int |
read(byte[] buf)
Returns
-1 . |
int |
read(byte[] buf,
int off,
int len)
Returns
-1 . |
void |
reset()
Noop.
|
long |
skip(long n)
Returns
0 . |
public static final EmptyInputStream INSTANCE
public int available()
0
.available
in class InputStream
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public void mark(int readLimit)
mark
in class InputStream
public boolean markSupported()
true
.markSupported
in class InputStream
public int read()
-1
.read
in class InputStream
public int read(byte[] buf)
-1
.read
in class InputStream
public int read(byte[] buf, int off, int len)
-1
.read
in class InputStream
public void reset()
reset
in class InputStream
public long skip(long n)
0
.skip
in class InputStream
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.