Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.verifiers.comm.bridge
Class JavaToCOutputStream

java.lang.Object
  extended by com.ibm.etools.iseries.edit.verifiers.comm.bridge.JavaToCOutputStream

public class JavaToCOutputStream
extends Object

The JavaToCOutputStream handles conversions from Java datatypes to C datatypes. This includes both UNICODE -> ANSI text conversions and integer data type conversions.


Field Summary
static String copyright
           
 
Constructor Summary
JavaToCOutputStream(OutputStream out)
          Constructor for JavaToCOutputStream.
 
Method Summary
static void main(String[] args)
          Test harness
 void write(byte[] value)
           
 void write(byte[] value, int length)
           
 void writeChar(char value)
           
 void writeInt(int value)
           
 void writeLong(int value)
           
 void writeShort(short value)
           
 void writeString(String value, int length)
          Write the String parameter padding upto length.
 void writeString(String value, int length, boolean nullTerminate)
          Write the String parameter padding upto length.
 void writeString(String value, int length, char padding, boolean nullTerminate)
          Write the String parameter padding upto length.
 void writeUnsignedChar(char value)
           
 void writeUnsignedInt(long value)
           
 void writeUnsignedLong(long value)
           
 void writeUnsignedShort(int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

JavaToCOutputStream

public JavaToCOutputStream(OutputStream out)
Constructor for JavaToCOutputStream.

Method Detail

write

public void write(byte[] value,
                  int length)
           throws IOException
Throws:
IOException

write

public void write(byte[] value)
           throws IOException
Throws:
IOException

writeShort

public void writeShort(short value)
                throws IOException
Throws:
IOException

writeUnsignedShort

public void writeUnsignedShort(int value)
                        throws IOException
Throws:
IOException

writeInt

public void writeInt(int value)
              throws IOException
Throws:
IOException

writeUnsignedInt

public void writeUnsignedInt(long value)
                      throws IOException
Throws:
IOException

writeLong

public void writeLong(int value)
               throws IOException
Throws:
IOException

writeUnsignedLong

public void writeUnsignedLong(long value)
                       throws IOException
Throws:
IOException

writeChar

public void writeChar(char value)
               throws IOException
Throws:
IOException

writeUnsignedChar

public void writeUnsignedChar(char value)
                       throws IOException
Throws:
IOException

writeString

public void writeString(String value,
                        int length)
                 throws IOException
Write the String parameter padding upto length. The String must be null terminated and the null terminator must follow the last character of the string (before padding).

Parameters:
value - The String to write to the output stream.
length - The number of bytes to write to the output stream.
Throws:
IOException

writeString

public void writeString(String value,
                        int length,
                        boolean nullTerminate)
                 throws IOException
Write the String parameter padding upto length. The String must be null terminated and the null terminator must follow the last character of the string (before padding).

Parameters:
value - The String to write to the output stream.
length - The number of bytes to write to the output stream.
nullTerminate - true if the string should be null terminated, false if it should not
Throws:
IOException

writeString

public void writeString(String value,
                        int length,
                        char padding,
                        boolean nullTerminate)
                 throws IOException
Write the String parameter padding upto length. The String must be null terminated and the null terminator must follow the last character of the string (before padding).

Parameters:
value - The String to write to the output stream.
length - The number of bytes to write to the output stream.
nullTerminate - true if the string should be null terminated, false if it should not
Throws:
IOException

main

public static void main(String[] args)
Test harness


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.