org.apache.poi.hpsf
Class TypeWriter
- java.lang.Object
-
- org.apache.poi.hpsf.TypeWriter
-
public class TypeWriter extends java.lang.ObjectClass for writing little-endian data and more.
-
-
Constructor Summary
Constructors Constructor and Description TypeWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intwriteToStream(java.io.OutputStream out, ClassID n)Writes a 16-byteClassIDto an output stream.static intwriteToStream(java.io.OutputStream out, double n)Writes a double value value to an output stream.static intwriteToStream(java.io.OutputStream out, int n)Writes a four-byte value to an output stream.static intwriteToStream(java.io.OutputStream out, long n)Writes a eight-byte value to an output stream.static voidwriteToStream(java.io.OutputStream out, Property[] properties, int codepage)Writes an array ofPropertyinstances to an output stream according to the Horrible Property Stream Format.static intwriteToStream(java.io.OutputStream out, short n)Writes a two-byte value (short) to an output stream.static intwriteUIntToStream(java.io.OutputStream out, long n)Writes an unsigned four-byte value to an output stream.static voidwriteUShortToStream(java.io.OutputStream out, int n)Writes an unsigned two-byte value to an output stream.
-
-
-
Method Detail
-
writeToStream
public static int writeToStream(java.io.OutputStream out, short n) throws java.io.IOExceptionWrites 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.IOExceptionWrites 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.IOExceptionWrites 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.IOExceptionWrites an unsigned two-byte value to an output stream.
- Parameters:
out- The stream to write ton- 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.IOExceptionWrites 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.IOExceptionWrites a 16-byte
ClassIDto an output stream.- Parameters:
out- The stream to write ton- 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, UnsupportedVariantTypeExceptionWrites an array of
Propertyinstances to an output stream according to the Horrible Property Stream Format.- Parameters:
out- The stream to write toproperties- The array to write to the streamcodepage- The codepage number to use for writing strings- Throws:
java.io.IOException- if an I/O error occursUnsupportedVariantTypeException- if HPSF does not support some variant type.
-
writeToStream
public static int writeToStream(java.io.OutputStream out, double n) throws java.io.IOExceptionWrites 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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG