hultig.io
Class FileOUT

java.lang.Object
  extended by java.io.File
      extended by hultig.io.FileOUT
All Implemented Interfaces:
Serializable, Comparable<File>

public class FileOUT
extends File

NOT YET WELL COMMENTED.

Copyright: Copyright (c) 2007

Company: UBI/HULTIG

See Also:
Serialized Form

Field Summary
protected  String base
          File base name - example: for file "fxyz.dat", "fxyz" would be its base name, and ".dat" its extension token.
protected  String encode
           
protected  String ext
           
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
FileOUT(String fname)
           
FileOUT(String fname, String encode)
          The default encoding is: UTF-8
 
Method Summary
 void close()
          Close this file.
 void flush()
           
 String getBase()
           
 String getBaseExt()
           
 String getEncoding()
          Return the current encoding;
 String getExt()
           
static void main(String[] args)
          M A I N - For testing ...
 boolean open()
          Open the defined output file, with UTF-8 encoding.
 boolean open(String encoding)
          Redefine the output character encoding
 void print(String s)
          A shortcut for standard print.
 void printf(String format, Object... args)
          My printf function, similar to the C function.
 void printfPT(String format, Object... args)
          My printf function, similar to the C function.
 void println(String s)
          shortcut for standard println.
 String sprintf(String format, Object... args)
          My sprintf function, similar to the C function.
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

encode

protected String encode

base

protected String base
File base name - example: for file "fxyz.dat", "fxyz" would be its base name, and ".dat" its extension token.


ext

protected String ext
Constructor Detail

FileOUT

public FileOUT(String fname)

FileOUT

public FileOUT(String fname,
               String encode)
The default encoding is: UTF-8

Parameters:
string - String
Method Detail

getBase

public String getBase()

getExt

public String getExt()

getBaseExt

public String getBaseExt()

close

public void close()
Close this file.


open

public boolean open()
Open the defined output file, with UTF-8 encoding.

Returns:

flush

public void flush()

open

public boolean open(String encoding)
Redefine the output character encoding

Parameters:
encoding -
Returns:

getEncoding

public String getEncoding()
Return the current encoding;

Returns:
String

print

public void print(String s)
A shortcut for standard print.

Parameters:
s - String

println

public void println(String s)
shortcut for standard println.

Parameters:
s - String

sprintf

public String sprintf(String format,
                      Object... args)
My sprintf function, similar to the C function.

Parameters:
format - String
args - Object[]
Returns:
String

printf

public void printf(String format,
                   Object... args)
My printf function, similar to the C function.

Parameters:
format - String
args - Object[]

printfPT

public void printfPT(String format,
                     Object... args)
My printf function, similar to the C function.

Parameters:
format - String
args - Object[]

main

public static void main(String[] args)
M A I N - For testing ...

Parameters:
args -