Package com.yahoo.io.reader
Class NamedReader
java.lang.Object
java.io.Reader
com.yahoo.io.reader.NamedReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
A reader with a name. All reader methods are delegated to the wrapped reader.
- Author:
- bratseth
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static voidcloseAll(List<NamedReader> readers) Convenience method for closing a list of readers.getName()voidmark(int i) booleanstatic Readerintread()intread(char[] chars) intread(char[] chars, int i, int i1) intread(CharBuffer charBuffer) booleanready()voidreset()longskip(long l) toString()Returns the namelongtransferTo(Writer out)
-
Constructor Details
-
NamedReader
-
-
Method Details
-
getName
-
getReader
-
toString
Returns the name -
nullReader
-
read
- Specified by:
readin interfaceReadable- Overrides:
readin classReader- Throws:
IOException
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Overrides:
readin classReader- Throws:
IOException
-
read
- Specified by:
readin classReader- Throws:
IOException
-
skip
- Overrides:
skipin classReader- Throws:
IOException
-
ready
- Overrides:
readyin classReader- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classReader
-
mark
- Overrides:
markin classReader- Throws:
IOException
-
reset
- Overrides:
resetin classReader- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
transferTo
- Overrides:
transferToin classReader- Throws:
IOException
-
closeAll
Convenience method for closing a list of readers. Does nothing if the given reader list is null.
-