IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class TagOutputStream

java.lang.Object
  extended by com.ibm.btt.base.TagInputStream
      extended by com.ibm.btt.base.TagOutputStream
All Implemented Interfaces:
java.io.DataOutput, java.io.ObjectOutput

public class TagOutputStream
extends TagInputStream
implements java.io.ObjectOutput

This class is a Stream able to deal with individual tags and groups of tags. It has a Vector with the tags and a table with a pairs-name index to locate them in the Vector more quickly. This stream can write tags as well as read them.


Field Summary
 java.io.FileOutputStream outputStream
          OutputStream for tag definition
 
Fields inherited from class com.ibm.btt.base.TagInputStream
_isSimpleTag, _tagCharArray, _tagLength, bufferedReader, DEFAULT_TAG_SIZE, DEFAULT_TAG_SIZE_INCREMENT, inputStream, sgmlFile, tagIndexes
 
Constructor Summary
TagOutputStream()
          Constructs a TagOutputStream.
TagOutputStream(java.lang.String fileName, java.lang.String kindOfFile)
          This constructor creates a TagOuputStream object to read from or write to the specified file.
 
Method Summary
 void copyOutputFileToInputFile()
          Copies a temporary file to the XML file.
 void flush()
          This method is required by the ObjectOutput interface.
 java.lang.String getTemporalPathAndFile()
          Returns a temporal file to write tags that have to be inserted.
 void removeTags(Vector tags)
          Removes the tags listed in the Vector from the input file.
 void write(byte[] b)
          This method is required by the ObjectOutput interface.
 void write(byte[] b, int i1, int i2)
          This method is required by the ObjectOutput interface.
 void write(int anInt)
          This method is required by the ObjectOutput interface.
 void writeBoolean(boolean b)
          This method is required by the ObjectOutput interface.
 void writeByte(int i)
          This method is required by the ObjectOutput interface.
 void writeBytes(java.lang.String s)
          This method is required by the ObjectOutput interface.
 void writeChar(int anInt)
          This method is required by the ObjectOutput interface.
 void writeChars(java.lang.String line)
          Writes a set of chars into the file.
 void writeDouble(double d)
          This method is required by the ObjectOutput interface.
 void writeFloat(float f)
          This method is required by the ObjectOutput interface.
 void writeInt(int i)
          This method is required by the ObjectOutput interface.
 void writeLine(java.lang.String aLine)
          Writes a line into the file.
 void writeLines(Vector lines)
          Writes the Strings contained within the Vector into the file.
 void writeLong(long l)
          This method is required by the ObjectOutput interface.
 void writeObject(java.lang.Object anObject)
          Writes an object in XML format into the file.
 void writeShort(int i)
          This method is required by the ObjectOutput interface.
 void writeTags(Vector tags)
          Writes the tags contained within the Vector into the file.
 void writeUTF(java.lang.String s)
          This method is required by the ObjectOutput interface.
 
Methods inherited from class com.ibm.btt.base.TagInputStream
close, createComposedTag, createComposedTag, first, getDateCreationFile, getExternalizer, getInputStream, getKindOfFile, getSgmlFile, getSgmlFileTitle, getTag, getTagIndexes, getTags, getTagString, getTagString, initialize, initialize, initialize, initialize, initialize, isDecorator, isSimpleTag, last, read, readObject, readTag, removeTagWithId, reset, setDate, setDate, setDate, setExternalizer, setKindOfFile, setSgmlFile, setTagIndexes, setTags, skip, tagWithId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectOutput
close
 

Field Detail

outputStream

public java.io.FileOutputStream outputStream
OutputStream for tag definition

Constructor Detail

TagOutputStream

public TagOutputStream()
Constructs a TagOutputStream.


TagOutputStream

public TagOutputStream(java.lang.String fileName,
                       java.lang.String kindOfFile)
                throws java.io.IOException
This constructor creates a TagOuputStream object to read from or write to the specified file.

Parameters:
fileName - java.lang.String
kindOfFile - java.lang.String
Throws:
java.io.IOException
Method Detail

copyOutputFileToInputFile

public void copyOutputFileToInputFile()
                               throws java.io.IOException
Copies a temporary file to the XML file.

Throws:
java.io.IOException

flush

public void flush()
This method is required by the ObjectOutput interface.

Specified by:
flush in interface java.io.ObjectOutput

getTemporalPathAndFile

public java.lang.String getTemporalPathAndFile()
                                        throws java.io.IOException
Returns a temporal file to write tags that have to be inserted.

Returns:
java.lang.String
Throws:
java.io.IOException

removeTags

public void removeTags(Vector tags)
                throws java.io.IOException
Removes the tags listed in the Vector from the input file.

Throws:
java.io.IOException

write

public void write(byte[] b)
This method is required by the ObjectOutput interface.

Specified by:
write in interface java.io.DataOutput
Specified by:
write in interface java.io.ObjectOutput

write

public void write(byte[] b,
                  int i1,
                  int i2)
This method is required by the ObjectOutput interface.

Specified by:
write in interface java.io.DataOutput
Specified by:
write in interface java.io.ObjectOutput

write

public void write(int anInt)
This method is required by the ObjectOutput interface.

Specified by:
write in interface java.io.DataOutput
Specified by:
write in interface java.io.ObjectOutput

writeBoolean

public void writeBoolean(boolean b)
This method is required by the ObjectOutput interface.

Specified by:
writeBoolean in interface java.io.DataOutput

writeByte

public void writeByte(int i)
This method is required by the ObjectOutput interface.

Specified by:
writeByte in interface java.io.DataOutput

writeBytes

public void writeBytes(java.lang.String s)
This method is required by the ObjectOutput interface.

Specified by:
writeBytes in interface java.io.DataOutput

writeChar

public void writeChar(int anInt)
This method is required by the ObjectOutput interface.

Specified by:
writeChar in interface java.io.DataOutput

writeChars

public void writeChars(java.lang.String line)
                throws java.io.IOException
Writes a set of chars into the file.

Specified by:
writeChars in interface java.io.DataOutput
Parameters:
line - java.lang.String
Throws:
java.io.IOException

writeDouble

public void writeDouble(double d)
This method is required by the ObjectOutput interface.

Specified by:
writeDouble in interface java.io.DataOutput

writeFloat

public void writeFloat(float f)
This method is required by the ObjectOutput interface.

Specified by:
writeFloat in interface java.io.DataOutput

writeInt

public void writeInt(int i)
This method is required by the ObjectOutput interface.

Specified by:
writeInt in interface java.io.DataOutput

writeLine

public void writeLine(java.lang.String aLine)
               throws java.io.IOException
Writes a line into the file.

Parameters:
aLine - java.lang.String
Throws:
java.io.IOException

writeLines

public void writeLines(Vector lines)
                throws java.io.IOException
Writes the Strings contained within the Vector into the file.

Parameters:
lines - Vector
Throws:
java.io.IOException

writeLong

public void writeLong(long l)
This method is required by the ObjectOutput interface.

Specified by:
writeLong in interface java.io.DataOutput

writeObject

public void writeObject(java.lang.Object anObject)
                 throws java.io.IOException
Writes an object in XML format into the file.

Specified by:
writeObject in interface java.io.ObjectOutput
Parameters:
anObject - java.lang.Object
Throws:
java.io.IOException

writeShort

public void writeShort(int i)
This method is required by the ObjectOutput interface.

Specified by:
writeShort in interface java.io.DataOutput

writeTags

public void writeTags(Vector tags)
               throws java.io.IOException
Writes the tags contained within the Vector into the file.

Throws:
java.io.IOException

writeUTF

public void writeUTF(java.lang.String s)
This method is required by the ObjectOutput interface.

Specified by:
writeUTF in interface java.io.DataOutput

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009