ca.idms.io
Class UnicodeFormat

java.lang.Object
  extended by ca.idms.io.TraceObject
      extended by ca.idms.io.NativeFormat
          extended by ca.idms.io.UnicodeFormat
All Implemented Interfaces:
Trace

public class UnicodeFormat
extends NativeFormat

Specifies formats of network data types using Unicode.

Since:
CA IDMS Server 4.2 OS/390 Edition
Version:
1.00 01/03/00
Author:
Dave Ross
See Also:
NativeFormat

Field Summary
 
Fields inherited from class ca.idms.io.NativeFormat
bytes, cecp, CECP, CLIENT, EBCDIC, enc, enci, format, FORMAT, IDMS, ieee, katakana, LOCAL, low, NATIVE, NULLS, platform, PLATFORM, role, ROLE, S390, SERVER, SI, SO, SPACES, UNICODE, UTF8, X64, X86, ZONE42
 
Fields inherited from class ca.idms.io.TraceObject
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE
 
Constructor Summary
UnicodeFormat(int opt)
          Create a object to format network data using Unicode.
 
Method Summary
 byte[] getBytes(java.lang.String str, int len)
          Converts a string into a fixed length array of bytes.
 NativeDataInputStream getDataInput(TraceBufferInputStream in)
          Creates an input filter stream to read network data.
 NativeDataOutputStream getDataOutput(TraceBufferOutputStream out)
          Creates an output filter stream to writes network data.
 boolean isNative()
          Gets format, convenience method.
 boolean isUnicode()
          Gets format, convenience method.
 boolean isUTF8()
          Gets format, convenience method.
 
Methods inherited from class ca.idms.io.NativeFormat
get, getArch, getBytes, getBytesInternal, getBytesZ, getDefaultEnc, getEnc, getFormat, getMaxBytesPerChar, getPlatform, getRole, getString, getString, getStringInternal, isClient, isIEEE, isKatakana, isLocal, isLow, isMicrosoft, isPC, isS390, isServer, isSOSI, isX64, isX86, pad, readBytes, readBytesZ, toUpperAscii, toUpperEbcdic, writeBytes, writeBytes, writeBytesZ
 
Methods inherited from class ca.idms.io.TraceObject
finalize, getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnicodeFormat

public UnicodeFormat(int opt)
Create a object to format network data using Unicode.

Parameters:
opt - client server role iptions
Method Detail

isNative

public boolean isNative()
Description copied from class: NativeFormat
Gets format, convenience method.

Overrides:
isNative in class NativeFormat
Returns:
false.
See Also:
NativeFormat.getFormat(), NativeFormat.isUTF8(), NativeFormat.isUnicode()

isUnicode

public boolean isUnicode()
Description copied from class: NativeFormat
Gets format, convenience method.

Overrides:
isUnicode in class NativeFormat
Returns:
false.
See Also:
NativeFormat.getFormat(), NativeFormat.isNative(), NativeFormat.isUTF8()

isUTF8

public boolean isUTF8()
Description copied from class: NativeFormat
Gets format, convenience method.

Overrides:
isUTF8 in class NativeFormat
Returns:
true.
See Also:
NativeFormat.getFormat(), NativeFormat.isNative(), NativeFormat.isUnicode()

getBytes

public byte[] getBytes(java.lang.String str,
                       int len)
                throws java.io.UnsupportedEncodingException,
                       DataTruncationException
Converts a string into a fixed length array of bytes. This is intended for sending data in "network" format, and interpets the length in characters instead of bytes.

Overrides:
getBytes in class NativeFormat
Parameters:
str - String to convert
len - the requested length is doubled
Returns:
the converted byte array
Throws:
java.io.UnsupportedEncodingException - not likely
DataTruncationException - if the result is truncated

getDataInput

public NativeDataInputStream getDataInput(TraceBufferInputStream in)
Creates an input filter stream to read network data.

Overrides:
getDataInput in class NativeFormat
Parameters:
in - underlying input stream
Returns:
a native data input stream
See Also:
NativeDataInputStream

getDataOutput

public NativeDataOutputStream getDataOutput(TraceBufferOutputStream out)
Creates an output filter stream to writes network data.

Overrides:
getDataOutput in class NativeFormat
Parameters:
out - underlying DataOutputStream
Returns:
a native output stream.
See Also:
NativeDataOutputStream


Copyright © 2009 CA, All rights reserved