Package org.codehaus.stax2.io
Class Stax2FileSource
- java.lang.Object
-
- org.codehaus.stax2.io.Stax2Source
-
- org.codehaus.stax2.io.Stax2ReferentialSource
-
- org.codehaus.stax2.io.Stax2FileSource
-
- All Implemented Interfaces:
Source
public class Stax2FileSource extends Stax2ReferentialSource
Simple implementation ofStax2ReferentialSource, which refers to the specific file.
-
-
Field Summary
-
Fields inherited from class org.codehaus.stax2.io.Stax2Source
mEncoding, mPublicId, mSystemId
-
-
Constructor Summary
Constructors Constructor Description Stax2FileSource(File f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamconstructInputStream()This method creates anInputStreamvia which underlying input source can be accessed.ReaderconstructReader()This method creates aReadervia which underlying input source can be accessed.FilegetFile()URLgetReference()-
Methods inherited from class org.codehaus.stax2.io.Stax2ReferentialSource
getSystemId
-
Methods inherited from class org.codehaus.stax2.io.Stax2Source
getEncoding, getPublicId, setEncoding, setPublicId, setSystemId
-
-
-
-
Constructor Detail
-
Stax2FileSource
public Stax2FileSource(File f)
-
-
Method Detail
-
getReference
public URL getReference()
- Specified by:
getReferencein classStax2ReferentialSource- Returns:
- URL that refers to the reference resource, for the purposes of resolving a relative reference from content read from the resource.
-
constructReader
public Reader constructReader() throws IOException
Description copied from class:Stax2SourceThis method creates aReadervia which underlying input source can be accessed. Note that caller is responsible for closing that Reader when it is done reading it.- Specified by:
constructReaderin classStax2ReferentialSource- Throws:
IOException
-
constructInputStream
public InputStream constructInputStream() throws IOException
Description copied from class:Stax2SourceThis method creates anInputStreamvia which underlying input source can be accessed. Note that caller is responsible for closing that InputSource when it is done reading it- Specified by:
constructInputStreamin classStax2ReferentialSource- Throws:
IOException
-
getFile
public File getFile()
-
-