de.grogra.util
Class OutputQueue
java.lang.Object
java.io.OutputStream
de.grogra.util.OutputQueue
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataOutput, java.io.Flushable
- Direct Known Subclasses:
- HierarchicalQueue
public class OutputQueue
- extends java.io.OutputStream
- implements java.io.DataOutput
This class represents a queue of byte
, int
,
long
, float
, double
,
and Object
-values.
For each type, a separate list is stored.
- Author:
- Ole Kniemeyer
Constructor Summary |
OutputQueue(boolean usesObjectQueue)
Creates a new OutputQueue . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputQueue
public OutputQueue(boolean usesObjectQueue)
- Creates a new
OutputQueue
.
- Parameters:
usesObjectQueue
- true
iff the queue of
type Object
will be used
clear
public void clear()
close
public void close()
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
dump
public void dump(java.io.PrintStream out)
flush
public void flush()
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
write
public final void write(byte[] b)
- Specified by:
write
in interface java.io.DataOutput
- Overrides:
write
in class java.io.OutputStream
write
public final void write(byte[] b,
int off,
int len)
- Specified by:
write
in interface java.io.DataOutput
- Overrides:
write
in class java.io.OutputStream
write
public final void write(int b)
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in class java.io.OutputStream
writeBoolean
public final void writeBoolean(boolean v)
- Specified by:
writeBoolean
in interface java.io.DataOutput
writeByte
public final void writeByte(int v)
- Specified by:
writeByte
in interface java.io.DataOutput
writeBytes
public final void writeBytes(java.lang.String s)
- Specified by:
writeBytes
in interface java.io.DataOutput
writeChar
public final void writeChar(int v)
- Specified by:
writeChar
in interface java.io.DataOutput
writeChars
public final void writeChars(java.lang.String s)
- Specified by:
writeChars
in interface java.io.DataOutput
writeDouble
public final void writeDouble(double v)
- Specified by:
writeDouble
in interface java.io.DataOutput
writeFloat
public final void writeFloat(float v)
- Specified by:
writeFloat
in interface java.io.DataOutput
writeInt
public final void writeInt(int v)
- Specified by:
writeInt
in interface java.io.DataOutput
writeLong
public final void writeLong(long v)
- Specified by:
writeLong
in interface java.io.DataOutput
writeObject
public void writeObject(java.lang.Object v)
throws java.io.IOException
- Throws:
java.io.IOException
writeObjectInQueue
public final void writeObjectInQueue(java.lang.Object v)
writeShort
public final void writeShort(int v)
- Specified by:
writeShort
in interface java.io.DataOutput
writeUTF
public final void writeUTF(java.lang.String s)
- Specified by:
writeUTF
in interface java.io.DataOutput