com.b3dgs.lionengine.file
Interface FileWriter


public interface FileWriter

Describe a file writer, which performs file exploration.


Method Summary
 void close()
          Terminate writing, close file.
 java.lang.String getFileName()
          Get name of writing file.
 void writeBoolean(boolean b)
          Write boolean (1 bit, true or false)
 void writeByte(byte b)
          Write byte (1 byte, -128 to 127)
 void writeChar(char c)
          Write char (2 bytes, 0 to 65535)
 void writeDouble(double d)
          Write double (8 bytes, 4.94065645841246544e-324d to 1.79769313486231570e+308d)
 void writeFloat(float f)
          Write float (4 bytes, 1.40129846432481707e-45 to 3.40282346638528860e+38)
 void writeInteger(int i)
          Write integer (4 bytes, -2.147.483.648 to 2.147.483.647)
 void writeLong(long l)
          Write long (8 bytes, -9.223.372.036.854.775.808 to 9.223.372.036.854.775.807)
 void writeShort(short s)
          Write short (2 bytes, -32.768 to 32.767)
 void writeString(java.lang.String s)
          Write a sequence of chars (2 bytes and more)
 

Method Detail

writeBoolean

void writeBoolean(boolean b)
                  throws java.io.IOException
Write boolean (1 bit, true or false)

Parameters:
b - boolean to write
Throws:
java.io.IOException - error on writing.

writeByte

void writeByte(byte b)
               throws java.io.IOException
Write byte (1 byte, -128 to 127)

Parameters:
b - byte to write.
Throws:
java.io.IOException - error on writing.

writeChar

void writeChar(char c)
               throws java.io.IOException
Write char (2 bytes, 0 to 65535)

Parameters:
c - char to write.
Throws:
java.io.IOException - error on writing.

writeShort

void writeShort(short s)
                throws java.io.IOException
Write short (2 bytes, -32.768 to 32.767)

Parameters:
s - short to write.
Throws:
java.io.IOException - error on writing.

writeInteger

void writeInteger(int i)
                  throws java.io.IOException
Write integer (4 bytes, -2.147.483.648 to 2.147.483.647)

Parameters:
i - integer to write.
Throws:
java.io.IOException - error on writing.

writeFloat

void writeFloat(float f)
                throws java.io.IOException
Write float (4 bytes, 1.40129846432481707e-45 to 3.40282346638528860e+38)

Parameters:
f - float to write.
Throws:
java.io.IOException - error on writing.

writeLong

void writeLong(long l)
               throws java.io.IOException
Write long (8 bytes, -9.223.372.036.854.775.808 to 9.223.372.036.854.775.807)

Parameters:
l - long to write.
Throws:
java.io.IOException - error on writing.

writeDouble

void writeDouble(double d)
                 throws java.io.IOException
Write double (8 bytes, 4.94065645841246544e-324d to 1.79769313486231570e+308d)

Parameters:
d - double to write.
Throws:
java.io.IOException - error on writing.

writeString

void writeString(java.lang.String s)
                 throws java.io.IOException
Write a sequence of chars (2 bytes and more)

Parameters:
s - string to write.
Throws:
java.io.IOException - error on reading.

close

void close()
           throws java.io.IOException
Terminate writing, close file.

Throws:
java.io.IOException - error on closing.

getFileName

java.lang.String getFileName()
Get name of writing file.

Returns:
name of writing file.