util
Class CrystalOutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.FilterOutputStream
|
+--util.CrystalOutputStream
- public class CrystalOutputStream
- extends FilterOutputStream
A stream for 'crystalizing' data so that it can be inserted into a
database. This packs the data into a very long ASCII string,
without using weird control characters. This helps a great deal
for storing the data in long text objects. This should create data
usable in any SQL database.
The crystalized form is as follows: The input string is analyzed
for text characters (not including 'x' or '!', which are used as
special flags). Strings of such text are preceded by a '!' flag,
and proceed until the next '!' or 'x' flag. Characters which are
not text are converted to hexadecimal and preceded by an 'x'
flag.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrystalOutputStream
public CrystalOutputStream(OutputStream out)
write
public void write(int b)
throws IOException
- Overrides:
write
in class FilterOutputStream
write
public void write(byte[] b)
throws IOException
- Overrides:
write
in class FilterOutputStream
write
public void write(byte[] b,
int off,
int len)
throws IOException
- Overrides:
write
in class FilterOutputStream
main
public static void main(String[] args)