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:
javax.xml.transform.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(java.io.File f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStream
constructInputStream()
This method creates anInputStream
via which underlying input source can be accessed.java.io.Reader
constructReader()
This method creates aReader
via which underlying input source can be accessed.java.io.File
getFile()
java.net.URL
getReference()
-
Methods inherited from class org.codehaus.stax2.io.Stax2ReferentialSource
getSystemId
-
Methods inherited from class org.codehaus.stax2.io.Stax2Source
getEncoding, getPublicId, setEncoding, setPublicId, setSystemId
-
-
-
-
Method Detail
-
getReference
public java.net.URL getReference()
- Specified by:
getReference
in 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 java.io.Reader constructReader() throws java.io.IOException
Description copied from class:Stax2Source
This method creates aReader
via which underlying input source can be accessed. Note that caller is responsible for closing that Reader when it is done reading it.- Specified by:
constructReader
in classStax2ReferentialSource
- Throws:
java.io.IOException
-
constructInputStream
public java.io.InputStream constructInputStream() throws java.io.IOException
Description copied from class:Stax2Source
This method creates anInputStream
via which underlying input source can be accessed. Note that caller is responsible for closing that InputSource when it is done reading it- Specified by:
constructInputStream
in classStax2ReferentialSource
- Throws:
java.io.IOException
-
getFile
public java.io.File getFile()
-
-