Class SceneWriter

java.lang.Object
  |
  +--SceneWriter

public class SceneWriter
extends java.lang.Object

A simple output class to write values to a file. Based on FileOutput from Graham Roberts


Constructor Summary
SceneWriter(java.io.File f)
          Construct SceneWriter object given a file.
SceneWriter(java.io.OutputStream os)
          Create a SceneWriter from a stream
 
Method Summary
 void close()
          Close the file when finished
 void flush()
          Flush the writer
 void writeChar(char c)
          Write a char value to a file.
 void writeDouble(double d)
          Write a double value.
 void writeFloat(float f)
          Write a float value.
 void writeInt(int i)
          Write an int value to a file.
 void writeLong(long l)
          Write a long value.
 void writeNewline()
          Write a newline to a file.
 void writeString(java.lang.String s)
          Write a String value to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneWriter

public SceneWriter(java.io.File f)
            throws java.lang.Exception
Construct SceneWriter object given a file.

Parameters:
f - the file to read from

SceneWriter

public SceneWriter(java.io.OutputStream os)
            throws java.lang.Exception
Create a SceneWriter from a stream

Parameters:
os - the stream specifying the file location
Method Detail

close

public void close()
           throws java.io.IOException
Close the file when finished

java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flush the writer

java.io.IOException

writeInt

public final void writeInt(int i)
                    throws java.io.IOException
Write an int value to a file.

Parameters:
i - the int to write
java.io.IOException

writeLong

public final void writeLong(long l)
                     throws java.io.IOException
Write a long value.

Parameters:
l - the long to write
java.io.IOException

writeDouble

public final void writeDouble(double d)
                       throws java.io.IOException
Write a double value.

Parameters:
d - the double to write
java.io.IOException

writeFloat

public final void writeFloat(float f)
                      throws java.io.IOException
Write a float value.

Parameters:
f - the float to write
java.io.IOException

writeChar

public final void writeChar(char c)
                     throws java.io.IOException
Write a char value to a file.

Parameters:
c - the char to write
java.io.IOException

writeString

public final void writeString(java.lang.String s)
                       throws java.io.IOException
Write a String value to a file.

Parameters:
s - the string to write
java.io.IOException

writeNewline

public final void writeNewline()
                        throws java.io.IOException
Write a newline to a file.

java.io.IOException