|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.infinityloop.util.inout.OutputProxy
public class OutputProxy
A generalized output source object to pass around in the application. For simplicity, this uses a blue print of the org.xml.sax.InputSource interface.
Special feature: You can request "substreams", which logically belong to the main stream this Proxy stands for, but which are directed to different end points (files or streams). Not yet implemented (will use OutputStreamFactory).
Constructor Summary | |
---|---|
OutputProxy()
zero-arg constructor |
|
OutputProxy(DiskFile file)
Constructor for InputProxy with a DiskFile as parameter. |
|
OutputProxy(java.io.OutputStream byteStream)
Create a new output with a byte stream. |
|
OutputProxy(java.lang.String systemId)
Create a new output with a system identifier. |
|
OutputProxy(java.io.Writer characterStream)
Create a new output with a character stream. |
Method Summary | |
---|---|
void |
close()
close the proxy. |
java.io.OutputStream |
getByteStream(boolean doThrow)
Get the byte stream for this output. |
java.io.Writer |
getCharacterStream(boolean doThrow)
Returns the Reader. |
java.io.Writer |
getCharacterStream(java.lang.String enc)
Returns a reader with the specified encoding |
java.lang.String |
getEncoding()
Get the character encoding for a byte stream or URI. |
java.lang.String |
getPublicId()
Get the public identifier for this object. |
java.lang.String |
getSystemId()
Get the system identifier for this output. |
java.lang.String |
getSystemIdLocalFormat()
Get the system identifier for this output, in local file system format. |
java.lang.String |
getSystemIdName()
Returns the name portion to the systemId (i.e. it discards the path up to the file name |
java.lang.String |
getSystemIdPath()
returns the path portion to the systemId (i.e. it truncates the actual file name, and includes the trailing '/'. |
void |
open(boolean doThrow)
Opens the object for output. |
void |
setByteStream(java.io.OutputStream byteStream)
Set the byte stream for this output. |
void |
setCharacterStream(java.io.Writer characterStream)
Set the character stream for this output. |
void |
setEncoding(java.lang.String encoding)
Set the character encoding, if known. |
void |
setPublicId(java.lang.String publicId)
Set the public identifier for this output. |
void |
setSystemId(java.lang.String systemId)
Set the system identifier for this output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputProxy(DiskFile file)
public OutputProxy()
public OutputProxy(java.lang.String systemId)
public OutputProxy(java.io.OutputStream byteStream)
public OutputProxy(java.io.Writer characterStream)
Method Detail |
---|
public void setPublicId(java.lang.String publicId)
public java.lang.String getPublicId()
public void setSystemId(java.lang.String systemId)
systemId
- The system identifier as a string.public java.lang.String getSystemId()
setSystemId(java.lang.String)
,
getEncoding()
public java.lang.String getSystemIdLocalFormat()
setSystemId(java.lang.String)
,
getEncoding()
public void setByteStream(java.io.OutputStream byteStream)
byteStream
- A byte stream containing an XML document or
other entity.public java.io.OutputStream getByteStream(boolean doThrow) throws java.lang.Exception
The getEncoding method will return the character encoding for this byte stream, or null if unknown.
doThrow
- if true, an error result in throwing an appropriate Exception, otherwise simply null is returned
java.lang.Exception
public void setEncoding(java.lang.String encoding)
encoding
- A string describing the character encoding.public java.lang.String getEncoding()
public void setCharacterStream(java.io.Writer characterStream)
characterStream
- The character stream containing the
XML document or other entity.public java.io.Writer getCharacterStream(boolean doThrow) throws java.lang.Exception
doThrow
- if true, an error result in throwing an appropriate Exception, otherwise simply null is returned
java.lang.Exception
public java.io.Writer getCharacterStream(java.lang.String enc) throws java.io.UnsupportedEncodingException, java.lang.Exception
java.io.UnsupportedEncodingException
java.lang.Exception
public java.lang.String getSystemIdPath()
public java.lang.String getSystemIdName()
public void open(boolean doThrow) throws java.lang.Exception
doThrow
- if true, an error result in throwing an appropriate Exception
java.lang.Exception
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |