uk.me.parabola.io
Class StructuredOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
uk.me.parabola.io.StructuredOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class StructuredOutputStream
- extends java.io.FilterOutputStream
An output stream that has methods for writing strings and little endian
integers. Its a bit like DataOutput, but for little endian.
- Author:
- Steve Ratcliffe
Fields inherited from class java.io.FilterOutputStream |
out |
Method Summary |
void |
write(int b)
|
void |
write2(int b)
|
void |
write3(int i)
|
void |
write4(int b)
|
void |
writeString(java.lang.String s)
Writes a string including a terminating null byte. |
Methods inherited from class java.io.FilterOutputStream |
close, flush, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StructuredOutputStream
public StructuredOutputStream(java.io.OutputStream out)
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write2
public void write2(int b)
throws java.io.IOException
- Throws:
java.io.IOException
write3
public void write3(int i)
throws java.io.IOException
- Throws:
java.io.IOException
write4
public void write4(int b)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(java.lang.String s)
throws java.io.IOException
- Writes a string including a terminating null byte.
For each character in the string the low-order byte is written.
- Parameters:
s
- The string to write.
- Throws:
java.io.IOException
- If the write fails.