|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.harvard.hul.ois.mets.helper.MetsWriter
Writer to serialize an in-memory representation of a METS document to a file.
| Constructor Summary | |
MetsWriter(java.io.OutputStream out)
Instantiate a MetsWriter object with an open output stream. |
|
MetsWriter(java.io.OutputStream out,
java.lang.String encoding)
Instantiate a MetsWriter object for an open output stream with an encoding. |
|
| Method Summary | |
void |
attribute(java.lang.String qName,
java.lang.String value)
Write an attribute to the output stream. |
void |
attribute(java.lang.String qName,
java.lang.String value,
boolean noEscape)
Write an attribute to the output stream. |
void |
attributeName(java.lang.String qName)
Write an attribute name to the output stream. |
void |
attributeValue(java.lang.String value)
Write an attribute value to the output stream. |
void |
attributeValue(java.lang.String value,
boolean noEscape)
Write an attribute value to the output stream. |
void |
binary(byte[] b)
Writes b.length bytes from byte array to the output stream. |
void |
binary(byte[] b,
int off,
int len)
Writes b.length bytes from byte array to the output stream. |
void |
cdata(java.lang.String value)
Write CDATA to the output stream. |
void |
char_ref(int value)
Write character reference to the output stream. |
void |
char_ref(int value,
boolean hex)
Write character reference to the output stream. |
void |
comment(java.lang.String value)
Write comment to the output stream. |
void |
declaration()
Write an XML declaration to the output stream. |
void |
end(java.lang.String qName)
Write an end tag to the output stream. |
void |
entity_ref(java.lang.String value)
Write entity reference to the output stream. |
void |
flush()
Flush the output stream. |
boolean |
getNoEscape()
Return the value of the global "no escape" flag. |
void |
pi(java.lang.String target,
java.lang.String value)
Write processing instruction to the output stream. |
void |
setNoEscape(boolean noEscape)
Set the value of the global "no escape" flag. |
void |
start(java.lang.String qName)
Write a start tag to the output stream. |
void |
text(java.lang.String value)
Write text to the output stream. |
void |
text(java.lang.String value,
boolean noEscape)
Write text to the output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MetsWriter(java.io.OutputStream out)
throws MetsException
out - Open output stream
MetsException - I/O exception
public MetsWriter(java.io.OutputStream out,
java.lang.String encoding)
throws MetsException
out - Open output streamencoding - Character encoding
MetsException - I/O exception| Method Detail |
public boolean getNoEscape()
public void setNoEscape(boolean noEscape)
noEscape - "No escape" flag
public void attribute(java.lang.String qName,
java.lang.String value)
throws MetsException
qName - Attribute QNamevalue - Attribute value
MetsException - I/O exception
public void attribute(java.lang.String qName,
java.lang.String value,
boolean noEscape)
throws MetsException
qName - Attribute QNamevalue - Attribute valuenoEscape - If true, no XML escaping is performed on the text
MetsException - I/O exception
public void attributeName(java.lang.String qName)
throws MetsException
qName - Attribute QName
MetsException - I/O exception
public void attributeValue(java.lang.String value)
throws MetsException
value - Attribute value
MetsException - I/O exception
public void attributeValue(java.lang.String value,
boolean noEscape)
throws MetsException
value - Attribute valuenoEscape - If true, no XML escaping is performed on the attribute
MetsException - I/O exception
public void binary(byte[] b)
throws MetsException
b - byte array data
MetsException - I/O exception
public void binary(byte[] b,
int off,
int len)
throws MetsException
b - byte array dataoff - the start offset in the arraylen - the number of bytes to write
MetsException - I/O exception
public void cdata(java.lang.String value)
throws MetsException
value - CDATA value
MetsException - I/O exception
public void char_ref(int value)
throws MetsException
value - Reference value
MetsException - I/O exception
public void char_ref(int value,
boolean hex)
throws MetsException
value - Reference valuehex - True if a hexadecimal value
MetsException - I/O exception
public void comment(java.lang.String value)
throws MetsException
value - Comment value
MetsException - I/O exception
public void declaration()
throws MetsException
MetsException - I/O exception
public void end(java.lang.String qName)
throws MetsException
qName - Element QName
MetsException - I/O exception
public void entity_ref(java.lang.String value)
throws MetsException
value - Reference value
MetsException - I/O exception
public void flush()
throws MetsException
MetsException - I/O exception
public void pi(java.lang.String target,
java.lang.String value)
throws MetsException
target - PI targetvalue - PI value
MetsException - I/O exception
public void start(java.lang.String qName)
throws MetsException
qName - Element QName
MetsException - I/O exception
public void text(java.lang.String value)
throws MetsException
value - Text value
MetsException - I/O exception
public void text(java.lang.String value,
boolean noEscape)
throws MetsException
value - Text valuenoEscape - If true, no XML escaping is performed on the text
MetsException - I/O exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||