|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.umlv.unitex.io.UnicodeIO
public class UnicodeIO
This class provides methods for loading and saving UTF-16LE texts.
Constructor Summary | |
---|---|
UnicodeIO()
|
Method Summary | |
---|---|
static boolean |
isAUnicodeLittleEndianFile(java.io.File f)
|
static boolean |
isDigit(char c)
Tests if a character is a digit |
static java.io.FileInputStream |
openUnicodeLittleEndianFileInputStream(java.io.File f)
Opens and returns a file input stream. |
static java.io.FileOutputStream |
openUnicodeLittleEndianFileOutputStream(java.io.File f)
Opens and returns a file output stream. |
static int |
readChar(java.io.FileInputStream f)
Reads a character from a file. |
static int |
readCharRawly(java.io.FileInputStream f)
Reads a character from a file, considering 0x0D and 0x0A
as two distinct characters |
static java.lang.String |
readFirstLine(java.io.File f)
Reads the first line of a file |
static java.lang.String |
readLine(java.io.FileInputStream f)
Reads a line from a file |
static void |
skipChars(java.io.FileInputStream f,
int n)
Skips characters from a file |
static void |
skipLine(java.io.FileInputStream f)
Skips a line in a file |
static void |
writeChar(java.io.FileOutputStream f,
char c)
Writes a character to a file |
static void |
writeString(java.io.FileOutputStream f,
java.lang.String s)
Writes a string to a file |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnicodeIO()
Method Detail |
---|
public static int readCharRawly(java.io.FileInputStream f)
0x0D
and 0x0A
as two distinct characters
f
- the file input stream
public static int readChar(java.io.FileInputStream f)
0x0D
, then the following
0x0A
character is skipped.
f
- the file input stream
public static java.lang.String readLine(java.io.FileInputStream f)
f
- the file input stream
public static java.lang.String readFirstLine(java.io.File f)
f
- the file
public static void skipChars(java.io.FileInputStream f, int n)
f
- the file input streamn
- number of characters to skippublic static void skipLine(java.io.FileInputStream f)
f
- the file input streampublic static boolean isDigit(char c)
c
- the character to test
true
if c
is a digit, false
otherwisepublic static void writeChar(java.io.FileOutputStream f, char c)
f
- the file output streamc
- the character to writepublic static void writeString(java.io.FileOutputStream f, java.lang.String s)
f
- the file output streams
- the string to writepublic static boolean isAUnicodeLittleEndianFile(java.io.File f) throws java.io.FileNotFoundException
f
- a file
java.io.FileNotFoundException
- if the file cannot be openedpublic static java.io.FileInputStream openUnicodeLittleEndianFileInputStream(java.io.File f) throws NotAUnicodeLittleEndianFileException, java.io.FileNotFoundException
f
- the file
NotAUnicodeLittleEndianFileException
- if the file is not a Unicode Little Endian one
java.io.FileNotFoundException
- if the file cannot be openedpublic static java.io.FileOutputStream openUnicodeLittleEndianFileOutputStream(java.io.File f) throws java.io.FileNotFoundException
f
- the file
java.io.FileNotFoundException
- if the file cannot be opened
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |