Class Serializer
java.lang.Object
|
+--Serializer
- public class Serializer
- extends java.lang.Object
Provides XML serialization services.
- Version:
- $2007-05-01 03:16:54 mdh$
- Author:
- Malcolm D. Hyman
|
Method Summary |
org.apache.xml.serialize.OutputFormat |
outputFormatFactory(int lineWidth,
boolean indenting)
Produces OutputFormats. |
void |
serialize(ContentOwner owner,
java.io.File sink,
int lineWidth)
Serializes the DOM owned by the specified ContentOwner
to a file. |
void |
serialize(org.w3c.dom.Document doc,
java.io.File sink)
Serializes a DOM to a file, using the default setting for the line
width parameter. |
void |
serialize(org.w3c.dom.Document doc,
java.io.File sink,
int lineWidth)
Serializes a DOM to a file. |
java.io.ByteArrayOutputStream |
serialize(org.w3c.dom.Document doc,
int lineWidth,
boolean indenting)
Serializes a DOM to a byte array stream. |
void |
serialize(org.w3c.dom.Document doc,
java.io.OutputStream sink,
int lineWidth,
boolean indenting)
Serializes a DOM to a specified output stream. |
void |
serialize(org.w3c.dom.Document doc,
java.io.Writer sink,
int lineWidth,
boolean indenting)
Serializes a DOM to a specified writer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_LINE_WIDTH
public static final int DEFAULT_LINE_WIDTH
Serializer
public Serializer(ArborPanel panel)
serialize
public void serialize(org.w3c.dom.Document doc,
java.io.File sink,
int lineWidth)
throws java.io.IOException
- Serializes a DOM to a file.
- Parameters:
doc - DOMsink - file sink for XML serializationlineWidth - line width parameter for serialization
serialize
public void serialize(org.w3c.dom.Document doc,
java.io.File sink)
throws java.io.IOException
- Serializes a DOM to a file, using the default setting for the line
width parameter.
- Parameters:
doc - DOMsink - file sink for XML serialization
serialize
public void serialize(org.w3c.dom.Document doc,
java.io.OutputStream sink,
int lineWidth,
boolean indenting)
throws java.io.IOException
- Serializes a DOM to a specified output stream.
- Parameters:
doc - DOMsink - output streamlineWidth - line width parameter for serializationindenting - true if lines are to be indented
serialize
public void serialize(org.w3c.dom.Document doc,
java.io.Writer sink,
int lineWidth,
boolean indenting)
throws java.io.IOException
- Serializes a DOM to a specified writer.
- Parameters:
doc - DOMsink - writerlineWidth - line width parameter for serializationindenting - true if lines are to be indented
serialize
public java.io.ByteArrayOutputStream serialize(org.w3c.dom.Document doc,
int lineWidth,
boolean indenting)
throws java.io.IOException
- Serializes a DOM to a byte array stream.
- Parameters:
doc - DOMlineWidth - line width parameter for serializationindenting - true if lines are to be indented
serialize
public void serialize(ContentOwner owner,
java.io.File sink,
int lineWidth)
throws java.io.IOException
- Serializes the DOM owned by the specified
ContentOwner
to a file. This method respects the the "serialize.entities" property.
- Parameters:
owner - a ContentOwnersink - file sink for XML serializationlineWidth - width for output lines
outputFormatFactory
public org.apache.xml.serialize.OutputFormat outputFormatFactory(int lineWidth,
boolean indenting)
- Produces
OutputFormats. We could cache these, but we'd
have to make sure that they reflected changes in user settings.
- Parameters:
lineWidth - line width parameter for serializationindenting - true if lines are to be indented