org.apache.poi.hpsf
Class TypeWriter

java.lang.Object
  extended by org.apache.poi.hpsf.TypeWriter

Deprecated. POI 3.16 beta 2 - use LittleEndian instead

@Deprecated
@Removal(version="3.18")
public class TypeWriter
extends java.lang.Object

Class for writing little-endian data and more.


Constructor Summary
TypeWriter()
          Deprecated.  
 
Method Summary
static int writeToStream(java.io.OutputStream out, ClassID n)
          Deprecated. Writes a 16-byte ClassID to an output stream.
static int writeToStream(java.io.OutputStream out, double n)
          Deprecated. Writes a double value value to an output stream.
static int writeToStream(java.io.OutputStream out, int n)
          Deprecated. Writes a four-byte value to an output stream.
static int writeToStream(java.io.OutputStream out, long n)
          Deprecated. Writes a eight-byte value to an output stream.
static void writeToStream(java.io.OutputStream out, Property[] properties, int codepage)
          Deprecated. Writes an array of Property instances to an output stream according to the Horrible Property Stream Format.
static int writeToStream(java.io.OutputStream out, short n)
          Deprecated. Writes a two-byte value (short) to an output stream.
static int writeUIntToStream(java.io.OutputStream out, long n)
          Deprecated. Writes an unsigned four-byte value to an output stream.
static void writeUShortToStream(java.io.OutputStream out, int n)
          Deprecated. Writes an unsigned two-byte value to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeWriter

public TypeWriter()
Deprecated. 
Method Detail

writeToStream

public static int writeToStream(java.io.OutputStream out,
                                short n)
                         throws java.io.IOException
Deprecated. 

Writes a two-byte value (short) to an output stream.

Parameters:
out - The stream to write to.
n - The value to write.
Returns:
The number of bytes that have been written.
Throws:
java.io.IOException - if an I/O error occurs

writeToStream

public static int writeToStream(java.io.OutputStream out,
                                int n)
                         throws java.io.IOException
Deprecated. 

Writes a four-byte value to an output stream.

Parameters:
out - The stream to write to.
n - The value to write.
Returns:
The number of bytes written to the output stream.
Throws:
java.io.IOException - if an I/O error occurs

writeToStream

public static int writeToStream(java.io.OutputStream out,
                                long n)
                         throws java.io.IOException
Deprecated. 

Writes a eight-byte value to an output stream.

Parameters:
out - The stream to write to.
n - The value to write.
Returns:
The number of bytes written to the output stream.
Throws:
java.io.IOException - if an I/O error occurs

writeUShortToStream

public static void writeUShortToStream(java.io.OutputStream out,
                                       int n)
                                throws java.io.IOException
Deprecated. 

Writes an unsigned two-byte value to an output stream.

Parameters:
out - The stream to write to
n - The value to write
Throws:
java.io.IOException - if an I/O error occurs

writeUIntToStream

public static int writeUIntToStream(java.io.OutputStream out,
                                    long n)
                             throws java.io.IOException
Deprecated. 

Writes an unsigned four-byte value to an output stream.

Parameters:
out - The stream to write to.
n - The value to write.
Returns:
The number of bytes that have been written to the output stream.
Throws:
java.io.IOException - if an I/O error occurs

writeToStream

public static int writeToStream(java.io.OutputStream out,
                                ClassID n)
                         throws java.io.IOException
Deprecated. 

Writes a 16-byte ClassID to an output stream.

Parameters:
out - The stream to write to
n - The value to write
Returns:
The number of bytes written
Throws:
java.io.IOException - if an I/O error occurs

writeToStream

public static void writeToStream(java.io.OutputStream out,
                                 Property[] properties,
                                 int codepage)
                          throws java.io.IOException,
                                 UnsupportedVariantTypeException
Deprecated. 

Writes an array of Property instances to an output stream according to the Horrible Property Stream Format.

Parameters:
out - The stream to write to
properties - The array to write to the stream
codepage - The codepage number to use for writing strings
Throws:
java.io.IOException - if an I/O error occurs
UnsupportedVariantTypeException - if HPSF does not support some variant type.

writeToStream

public static int writeToStream(java.io.OutputStream out,
                                double n)
                         throws java.io.IOException
Deprecated. 

Writes a double value value to an output stream.

Parameters:
out - The stream to write to.
n - The value to write.
Returns:
The number of bytes written to the output stream.
Throws:
java.io.IOException - if an I/O error occurs