com.jme3.export.xml
クラス DOMSerializer

java.lang.Object
  上位を拡張 com.jme3.export.xml.DOMSerializer

public class DOMSerializer
extends java.lang.Object

The DOMSerializer was based primarily off the DOMSerializer.java class from the "Java and XML" 3rd Edition book by Brett McLaughlin, and Justin Edelson. Some modifications were made to support formatting of elements and attributes.


コンストラクタの概要
DOMSerializer()
           
 
メソッドの概要
 void serialize(org.w3c.dom.Document doc, java.io.File file)
          Serialize doc to out
 void serialize(org.w3c.dom.Document doc, java.io.OutputStream out)
          Serialize doc to out
 void setEncoding(java.lang.String encoding)
          Set the encoding used by this serializer.
 void setIndent(int indent)
          Set the number of spaces to use for indentation.
 void setLineSeparator(java.lang.String lineSeparator)
          Set the line separator that will be used when serializing documents.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

DOMSerializer

public DOMSerializer()
メソッドの詳細

serialize

public void serialize(org.w3c.dom.Document doc,
                      java.io.File file)
               throws java.io.IOException
Serialize doc to out

パラメータ:
doc - the document to serialize.
file - the file to serialize to.
例外:
java.io.IOException

serialize

public void serialize(org.w3c.dom.Document doc,
                      java.io.OutputStream out)
               throws java.io.IOException
Serialize doc to out

パラメータ:
doc - the document to serialize.
out - the stream to serialize to.
例外:
java.io.IOException

setEncoding

public void setEncoding(java.lang.String encoding)
Set the encoding used by this serializer.

パラメータ:
encoding - the encoding to use, passing in null results in the default encoding (UTF-8) being set.
例外:
IllegalCharsetNameException - if the given charset name is illegal.
UnsupportedCharsetException - if the given charset is not supported by the current JVM.

setIndent

public void setIndent(int indent)
Set the number of spaces to use for indentation.

The default is to use 4 spaces.

パラメータ:
indent - the number of spaces to use for indentation, values less than or equal to zero result in no indentation being used.

setLineSeparator

public void setLineSeparator(java.lang.String lineSeparator)
Set the line separator that will be used when serializing documents.

If this is not called then the serializer uses a default based on the line.separator system property.

パラメータ:
lineSeparator - the line separator to set.