|
Enhydra 3.1.1b1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xml.sax.InputSource | +--org.enhydra.xml.io.ClosingInputSource
Input source that automatically close its InputStream when EOF is reached or an error occurs. This works around a flaw in the SAX API where there is not method of an entity handler that opens a stream to be informed when the stream is no longer needed.
Constructor Summary | |
ClosingInputSource()
Zero-argument default constructor. |
|
ClosingInputSource(InputSource inputSource,
boolean openNow)
Create a new input source from another input source. |
|
ClosingInputSource(java.io.InputStream byteStream)
Create a new input source with a byte stream. |
|
ClosingInputSource(java.io.Reader characterStream)
Create a new input source with a character stream. |
|
ClosingInputSource(java.lang.String systemId)
Create a new input source with a system identifier. |
|
ClosingInputSource(java.lang.String systemId,
boolean openNow)
Create a new input source with a system identifier. |
Method Summary | |
void |
open()
If the resource is specified by system id, open it now as a byte stream. |
void |
setByteStream(java.io.InputStream byteStream)
Set the byte stream, copying it to a buffer. |
void |
setCharacterStream(java.io.Reader characterStream)
Set the character stream, copying it to a buffer. |
Methods inherited from class org.xml.sax.InputSource |
getByteStream,
getCharacterStream,
getEncoding,
getPublicId,
getSystemId,
setEncoding,
setPublicId,
setSystemId |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ClosingInputSource()
InputSource.InputSource()
public ClosingInputSource(InputSource inputSource, boolean openNow) throws java.io.IOException
inputSource
- Input source specification to cloneopenNow
- If true, the input source is opened immediatly
if specified as a system id.InputSource
public ClosingInputSource(java.lang.String systemId)
systemId
- The system identifier.InputSource.InputSource(String)
public ClosingInputSource(java.lang.String systemId, boolean openNow) throws java.io.IOException
systemId
- The system identifier.openNow
- If true, the input source is opened immediatly
if specified as a system id.InputSource.InputSource(String)
public ClosingInputSource(java.io.InputStream byteStream)
InputSource.InputSource(InputStream)
public ClosingInputSource(java.io.Reader characterStream)
InputSource.InputSource(Reader)
Method Detail |
public void open() throws java.io.IOException
public void setByteStream(java.io.InputStream byteStream)
InputSource.setByteStream(java.io.InputStream)
public void setCharacterStream(java.io.Reader characterStream)
InputSource.setCharacterStream(java.io.Reader)
|
Enhydra 3.1.1b1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |