net.sf.mmm.util.io.api
Class EncodingDetectionReader
java.lang.Object
java.io.Reader
net.sf.mmm.util.io.api.EncodingDetectionReader
- All Implemented Interfaces:
- Closeable, Readable
- Direct Known Subclasses:
- EncodingUtilImpl.UtfDetectionReader
public abstract class EncodingDetectionReader
- extends Reader
This class represents a Reader that automatically detects an encoding
while reading the data. Beside being a regular Reader this class acts
as API that additionally allows to get the detected
encoding in case you need this information (e.g. to save it as meta-data).
- Since:
- 1.0.1
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
- See Also:
EncodingUtil.createUtfDetectionReader(java.io.InputStream, String)
|
Method Summary |
abstract String |
getEncoding()
This method gets the encoding if already detected. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncodingDetectionReader
public EncodingDetectionReader()
getEncoding
public abstract String getEncoding()
- This method gets the encoding if already detected. The detection may last
until the end of this
Reader has been reached.
- Returns:
- the encoding or
null if NOT yet detected (then
typically
ASCII is assumed so far).
Copyright © 2001-2010 mmm-Team. All Rights Reserved.