Package net.markenwerk.commons.nulls
Class NullReader
- java.lang.Object
-
- java.io.Reader
-
- net.markenwerk.commons.nulls.NullReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
public class NullReader extends Reader
ANullReader
is anReader
that does nothing.- Since:
- 1.0.0
- Author:
- Torsten Krause (tk at markenwerk dot net)
-
-
Constructor Summary
Constructors Constructor Description NullReader()
Creates a newNullReader
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read(char[] buffer, int offset, int length)
-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
NullReader
public NullReader()
Creates a newNullReader
.
-
-
Method Detail
-
read
public int read(char[] buffer, int offset, int length) throws IOException
- Specified by:
read
in classReader
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classReader
- Throws:
IOException
-
-