org.jtheque.core.utils.file.jt
Class JTFileReader

java.lang.Object
  extended by org.jtheque.core.utils.file.jt.JTFileReader
All Implemented Interfaces:
IJTFileReader
Direct Known Subclasses:
JTDFileReader

public abstract class JTFileReader
extends java.lang.Object
implements IJTFileReader

A reader for JT Files.

Author:
Baptiste Wicht

Constructor Summary
JTFileReader()
           
 
Method Summary
 JTFile readFile(java.io.BufferedInputStream stream)
          Read a JT File from a stream.
abstract  JTFile readFile(java.io.DataInputStream stream)
          Read a JT File.
 JTFile readFile(java.io.File file)
          Read a JT File from a File object.
 JTFile readFile(java.io.FileInputStream stream)
          Read a JT File from a stream.
 JTFile readFile(java.lang.String path)
          Read a JT File from a filepath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTFileReader

public JTFileReader()
Method Detail

readFile

public final JTFile readFile(java.io.File file)
                      throws org.jtheque.utils.io.FileException
Description copied from interface: IJTFileReader
Read a JT File from a File object.

Specified by:
readFile in interface IJTFileReader
Parameters:
file - The file to read from.
Returns:
The JT File.
Throws:
org.jtheque.utils.io.FileException - Throws when an error occurs during the reading.

readFile

public final JTFile readFile(java.lang.String path)
                      throws org.jtheque.utils.io.FileException
Description copied from interface: IJTFileReader
Read a JT File from a filepath.

Specified by:
readFile in interface IJTFileReader
Parameters:
path - The path to the file to read from.
Returns:
The JT File.
Throws:
org.jtheque.utils.io.FileException - Throws when an error occurs during the reading.

readFile

public final JTFile readFile(java.io.FileInputStream stream)
                      throws org.jtheque.utils.io.FileException
Description copied from interface: IJTFileReader
Read a JT File from a stream.

Specified by:
readFile in interface IJTFileReader
Parameters:
stream - The stream to read from.
Returns:
The JT File.
Throws:
org.jtheque.utils.io.FileException - Throws when an error occurs during the reading.

readFile

public final JTFile readFile(java.io.BufferedInputStream stream)
                      throws org.jtheque.utils.io.FileException
Description copied from interface: IJTFileReader
Read a JT File from a stream.

Specified by:
readFile in interface IJTFileReader
Parameters:
stream - The stream to read from.
Returns:
The JT File.
Throws:
org.jtheque.utils.io.FileException - Throws when an error occurs during the reading.

readFile

public abstract JTFile readFile(java.io.DataInputStream stream)
                         throws org.jtheque.utils.io.FileException
Read a JT File.

Parameters:
stream - The data input stream to read from.
Returns:
The readed JT File.
Throws:
org.jtheque.utils.io.FileException - Throws when the file is corrupted.


Copyright © 2009 JTheque. All Rights Reserved.