com.servingxml.io.streamsource.file
Class FileSource
java.lang.Object
com.servingxml.io.streamsource.file.FileSource
- All Implemented Interfaces:
- StreamSource
public class FileSource
- extends java.lang.Object
- implements StreamSource
Constructor Summary |
FileSource(java.io.File file)
|
FileSource(java.io.File file,
java.nio.charset.Charset charset)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSource
public FileSource(java.io.File file,
java.nio.charset.Charset charset)
FileSource
public FileSource(java.io.File file)
getCharset
public java.nio.charset.Charset getCharset()
- Specified by:
getCharset
in interface StreamSource
getCharset
public java.nio.charset.Charset getCharset(java.nio.charset.Charset defaultCharset)
- Specified by:
getCharset
in interface StreamSource
getFile
public java.io.File getFile()
openStream
public java.io.InputStream openStream()
- Specified by:
openStream
in interface StreamSource
closeStream
public void closeStream(java.io.InputStream is)
throws java.io.IOException
- Specified by:
closeStream
in interface StreamSource
- Throws:
java.io.IOException
getKey
public Key getKey()
- Specified by:
getKey
in interface StreamSource
getExpirable
public Expirable getExpirable()
- Specified by:
getExpirable
in interface StreamSource
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interface StreamSource
createStreamExpirable
public static final StreamExpirable createStreamExpirable(java.io.File file)