java.lang.Object
java.io.OutputStream
de.grogra.util.OutputQueue
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,AutoCloseable
- Direct Known Subclasses:
HierarchicalQueue
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
close()
void
dump
(PrintStream out) void
flush()
final void
write
(byte[] b) final void
write
(byte[] b, int off, int len) final void
write
(int b) final void
writeBoolean
(boolean v) final void
writeByte
(int v) final void
writeBytes
(String s) final void
writeChar
(int v) final void
writeChars
(String s) final void
writeDouble
(double v) final void
writeFloat
(float v) final void
writeInt
(int v) final void
writeLong
(long v) void
final void
final void
writeShort
(int v) final void
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
OutputQueue
public OutputQueue(boolean usesObjectQueue) Creates a newOutputQueue
.- Parameters:
usesObjectQueue
-true
iff the queue of typeObject
will be used
-
-
Method Details
-
clear
public void clear() -
write
public final void write(int b) - Specified by:
write
in interfaceDataOutput
- Specified by:
write
in classOutputStream
-
write
public final void write(byte[] b) - Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
-
write
public final void write(byte[] b, int off, int len) - Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
-
writeBytes
- Specified by:
writeBytes
in interfaceDataOutput
-
writeChars
- Specified by:
writeChars
in interfaceDataOutput
-
flush
public void flush()- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
writeBoolean
public final void writeBoolean(boolean v) - Specified by:
writeBoolean
in interfaceDataOutput
-
writeShort
public final void writeShort(int v) - Specified by:
writeShort
in interfaceDataOutput
-
writeChar
public final void writeChar(int v) - Specified by:
writeChar
in interfaceDataOutput
-
writeByte
public final void writeByte(int v) - Specified by:
writeByte
in interfaceDataOutput
-
writeInt
public final void writeInt(int v) - Specified by:
writeInt
in interfaceDataOutput
-
writeLong
public final void writeLong(long v) - Specified by:
writeLong
in interfaceDataOutput
-
writeFloat
public final void writeFloat(float v) - Specified by:
writeFloat
in interfaceDataOutput
-
writeDouble
public final void writeDouble(double v) - Specified by:
writeDouble
in interfaceDataOutput
-
writeObjectInQueue
-
writeObject
- Throws:
IOException
-
writeUTF
- Specified by:
writeUTF
in interfaceDataOutput
-
dump
-