Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.wtc.jatmi
Class TypedString

    java.lang.Object
      |
      +--weblogic.wtc.jatmi.StandardTypes
            |
            +--weblogic.wtc.jatmi.TypedString

public final class TypedString
extends StandardTypes
implements TypedBuffer, java.io.Serializable

This is the jatmi analogue to the STRING Tuxedo buffer type

Author:
  BEA Systems, Inc.
See Also:
  `StandardTypes`, `TypedBuffer`, Serialized Form

Constructor Summary
`TypedString()` Generates a StringBuffer with the default capacity of 16
`TypedString(int capacity)` Creates an empty StringBuffer that has the initial capacity given
`TypedString(java.lang.String str)` Constructor.

Method Summary
`void` | `_tmpostrecv(java.io.DataInputStream decoder, int recv_size)` XDR decodes the given string.
`void` | `_tmpresend(java.io.DataOutputStream encoder)` This function presends and encodes the given TypedBuffer object.
`java.lang.StringBuffer` | `getStringBuffer()` Gets the StringBuffer associated with this object.
`java.lang.String` | `toString()` Returns a copy of this object as a String

Methods inherited from class weblogic.wtc.jatmi.StandardTypes
`getHintIndex, getSubtype, getType, hint_to_type`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TypedString

    public TypedString()

  Generates a StringBuffer with the default capacity of 16

### TypedString

    public TypedString(int capacity)

  Creates an empty StringBuffer that has the initial capacity given

  Parameters:
    `capacity` - The capacity the StringBuffer associated with this TypedString should have

### TypedString

    public TypedString(java.lang.String str)

  Constructor. Initializes object with a copy of the input string

  Parameters:
    `str` - the string to initialize this object with

Method Detail

### getStringBuffer

    public java.lang.StringBuffer getStringBuffer()

  Gets the StringBuffer associated with this object. Note that the object returned is the same object store used by this object, so care should be taken when updating the object returned while this TypedString is used in another thread. Use the toString method on this object to return this object as a String.

  Returns:
    The StringBuffer associated with this TypedString

### _tmpresend

    public void _tmpresend(java.io.DataOutputStream encoder)
                    throws TPException,
                           java.io.IOException

  This function presends and encodes the given TypedBuffer object. It is equivalent to the combination of _tmpresend and _tmencdec functions from the buffer(3i) TUXEDO manual page.

  XDR encodes the given string. XDR encoding of a string is four length bytes (not including any NULL byte at the end) followed by the string itself (low 32 bits of the unicode characters). It is padded out to make the total length a multiple of four.

  Specified by:
    _tmpresend in interface TypedBuffer

  Parameters:
    `encoder` - The output stream to encode this type to. Should not be padded.
  Throws:
    TPException -
    - TPEINVAL - If there was some problem with the state of the TypedBuffer.
    - Any other errno is considered a fatal error
    java.io.IOException - If there was an error writing to the DataOutputStream

### _tmpostrecv

    public void _tmpostrecv(java.io.DataInputStream decoder,
                            int recv_size)
                     throws TPException,
                            java.io.IOException

  XDR decodes the given string. XDR encoding of a string is four length bytes (not including any NULL byte at the end) followed by the string itself (low 32 bits of the unicode characters). It is padded out to make the total length a multiple of four.
  Specified by:
    _tmpostrecv in interface TypedBuffer

  Parameters:
    `decoder` - A stream that starts with the encoded data for this buffer type. Only recv_size bytes should be read from the stream (though at the time this function is called all bytes necessary to decode this type should be available)
    `recv_size` - The total size of encoded data from the start position (note that encoded may be larger than the actual recieved size)
  Throws:
    TPException - TPEINVAL if this stream could not be decoded for any reason

### toString

    public java.lang.String toString()

  Returns a copy of this object as a String

  Overrides:
    toString in class java.lang.Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference