com.b3dgs.lionengine.file
Interface FileReader


public interface FileReader

Describe a file reader, which performs file exploration.


Method Summary
 void close()
          Terminate reading, close file.
 java.lang.String getFileName()
          Get name of reading file.
 boolean readBoolean()
          Read boolean (1 bit, true or false)
 byte readByte()
          Read byte (1 byte, -128 to 127)
 char readChar()
          Read char (2 bytes, 0 to 65535)
 double readDouble()
          Read double (8 bytes, 4.94065645841246544e-324d to 1.79769313486231570e+308d)
 float readFloat()
          Read float (4 bytes, 1.40129846432481707e-45 to 3.40282346638528860e+38)
 int readInteger()
          Read integer (4 bytes, -2.147.483.648 to 2.147.483.647)
 long readLong()
          Read long (8 bytes, -9.223.372.036.854.775.808 to 9.223.372.036.854.775.807)
 short readShort()
          Read short (2 bytes, -32.768 to 32.767)
 java.lang.String readString()
          Read a sequence of chars (2 bytes and more)
 

Method Detail

readBoolean

boolean readBoolean()
                    throws java.io.IOException
Read boolean (1 bit, true or false)

Returns:
boolean read.
Throws:
java.io.IOException - error on reading.

readByte

byte readByte()
              throws java.io.IOException
Read byte (1 byte, -128 to 127)

Returns:
byte read.
Throws:
java.io.IOException - error on reading.

readChar

char readChar()
              throws java.io.IOException
Read char (2 bytes, 0 to 65535)

Returns:
char read.
Throws:
java.io.IOException - error on reading.

readShort

short readShort()
                throws java.io.IOException
Read short (2 bytes, -32.768 to 32.767)

Returns:
short read.
Throws:
java.io.IOException - error on reading.

readInteger

int readInteger()
                throws java.io.IOException
Read integer (4 bytes, -2.147.483.648 to 2.147.483.647)

Returns:
integer read.
Throws:
java.io.IOException - error on reading.

readFloat

float readFloat()
                throws java.io.IOException
Read float (4 bytes, 1.40129846432481707e-45 to 3.40282346638528860e+38)

Returns:
float read.
Throws:
java.io.IOException - error on reading.

readLong

long readLong()
              throws java.io.IOException
Read long (8 bytes, -9.223.372.036.854.775.808 to 9.223.372.036.854.775.807)

Returns:
long read.
Throws:
java.io.IOException - error on reading.

readDouble

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

Returns:
double read.
Throws:
java.io.IOException - error on reading.

readString

java.lang.String readString()
                            throws java.io.IOException
Read a sequence of chars (2 bytes and more)

Returns:
string read.
Throws:
java.io.IOException - error on reading.

close

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

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

getFileName

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

Returns:
name of reading file.