org.freehep.util.io
Class TaggedOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.freehep.util.io.CompressableOutputStream
-
- org.freehep.util.io.BitOutputStream
-
- org.freehep.util.io.ByteOrderOutputStream
-
- org.freehep.util.io.ByteCountOutputStream
-
- org.freehep.util.io.TaggedOutputStream
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.lang.AutoCloseable, FinishableOutputStream, TaggedOutput
public abstract class TaggedOutputStream extends ByteCountOutputStream implements TaggedOutput
Class to write Tagged blocks to a Stream. The tagged blocks (Tags) contain a tagID and a Length, so that known and unknown tags (read with the TaggedInputStream) can again be written. The stream also allows to write Actions, which again come with a actionCode and a length. A concrete implementation of this stream should encode/write the TagHeader. All Concrete tags should be inherited from the Tag class and implement their write methods.
-
-
Constructor Summary
Constructors Constructor and Description TaggedOutputStream(java.io.OutputStream out, TagSet tagSet, ActionSet actionSet)Create a Tagged Output stream.TaggedOutputStream(java.io.OutputStream out, TagSet tagSet, ActionSet actionSet, boolean littleEndian)Create a Tagged Output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidwriteAction(Action action)Write action.voidwriteTag(Tag tag)Write a tag.-
Methods inherited from class org.freehep.util.io.ByteCountOutputStream
append, close, getBufferLength, getLength, popBuffer, popBufferBytes, pushBuffer, write
-
Methods inherited from class org.freehep.util.io.ByteOrderOutputStream
size, writeAsciiZString, writeBoolean, writeByte, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeInt, writeLong, writeShort, writeShort, writeString, writeUnsignedByte, writeUnsignedByte, writeUnsignedInt, writeUnsignedInt, writeUnsignedShort, writeUnsignedShort, writeUTF, writeUTF
-
Methods inherited from class org.freehep.util.io.BitOutputStream
byteAlign, finish, minBits, minBits, minBits, writeBitFlag, writeFBits, writeSBits, writeUBits
-
Methods inherited from class org.freehep.util.io.CompressableOutputStream
startCompressing, write
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.freehep.util.io.TaggedOutput
close
-
-
-
-
Constructor Detail
-
TaggedOutputStream
public TaggedOutputStream(java.io.OutputStream out, TagSet tagSet, ActionSet actionSet)Create a Tagged Output stream.- Parameters:
out- stream to writetagSet- allowable tag setactionSet- allowable action set
-
TaggedOutputStream
public TaggedOutputStream(java.io.OutputStream out, TagSet tagSet, ActionSet actionSet, boolean littleEndian)Create a Tagged Output stream.- Parameters:
out- stream to writetagSet- allowable tag setactionSet- allowable action setlittleEndian- true if stream is little endian
-
-
Method Detail
-
writeTag
public void writeTag(Tag tag) throws java.io.IOException
Description copied from interface:TaggedOutputWrite a tag.- Specified by:
writeTagin interfaceTaggedOutput- Parameters:
tag- tag to write- Throws:
java.io.IOException- if write fails
-
writeAction
public void writeAction(Action action) throws java.io.IOException
Write action.- Parameters:
action- action to write- Throws:
java.io.IOException- if write fails
-
-
DMelt 3.0 © DataMelt by jWork.ORG