com.threerings.export
Class XMLExporter

java.lang.Object
  extended by com.threerings.export.Exporter
      extended by com.threerings.export.XMLExporter
All Implemented Interfaces:
Closeable

public class XMLExporter
extends Exporter

Exports to an XML format.


Field Summary
static String VERSION
          Identifies the format version.
 
Constructor Summary
XMLExporter(OutputStream out)
          Creates an exporter to write to the specified stream.
 
Method Summary
 void close()
          Writes out any remaining data and closes the underlying stream.
 void finish()
          Writes out any remaining data without closing the underlying stream.
 void write(String name, boolean value)
          Associates a boolean value with the current object.
 void write(String name, byte value)
          Associates a byte value with the current object.
 void write(String name, char value)
          Associates a character value with the current object.
 void write(String name, double value)
          Associates a double value with the current object.
 void write(String name, float value)
          Associates a float value with the current object.
 void write(String name, int value)
          Associates an integer value with the current object.
 void write(String name, long value)
          Associates a long value with the current object.
 void write(String name, short value)
          Associates a short value with the current object.
<T> void
write(String name, T value, Class<T> clazz)
          Associates an object value with the current object.
 void writeObject(Object object)
          Writes the object to the underlying stream.
 
Methods inherited from class com.threerings.export.Exporter
defaultWriteFields, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Identifies the format version.

See Also:
Constant Field Values
Constructor Detail

XMLExporter

public XMLExporter(OutputStream out)
Creates an exporter to write to the specified stream.

Method Detail

writeObject

public void writeObject(Object object)
                 throws IOException
Description copied from class: Exporter
Writes the object to the underlying stream.

Specified by:
writeObject in class Exporter
Throws:
IOException

write

public void write(String name,
                  boolean value)
           throws IOException
Description copied from class: Exporter
Associates a boolean value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  byte value)
           throws IOException
Description copied from class: Exporter
Associates a byte value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  char value)
           throws IOException
Description copied from class: Exporter
Associates a character value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  double value)
           throws IOException
Description copied from class: Exporter
Associates a double value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  float value)
           throws IOException
Description copied from class: Exporter
Associates a float value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  int value)
           throws IOException
Description copied from class: Exporter
Associates an integer value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  long value)
           throws IOException
Description copied from class: Exporter
Associates a long value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public void write(String name,
                  short value)
           throws IOException
Description copied from class: Exporter
Associates a short value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

write

public <T> void write(String name,
                      T value,
                      Class<T> clazz)
           throws IOException
Description copied from class: Exporter
Associates an object value with the current object.

Specified by:
write in class Exporter
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: Exporter
Writes out any remaining data and closes the underlying stream.

Specified by:
close in interface Closeable
Specified by:
close in class Exporter
Throws:
IOException

finish

public void finish()
            throws IOException
Description copied from class: Exporter
Writes out any remaining data without closing the underlying stream.

Specified by:
finish in class Exporter
Throws:
IOException


Copyright © 2011. All Rights Reserved.