com.jniwrapper
Class AnsiString

java.lang.Object
  |
  +--com.jniwrapper.Parameter
        |
        +--com.jniwrapper.ZeroTerminatedString
              |
              +--com.jniwrapper.AnsiString
All Implemented Interfaces:
StringParameter

public class AnsiString
extends ZeroTerminatedString

Represents a zero-terminated string of 8-bit (ANSI) character declared in C as (char *).

NOTE: All string lengths include the terminating zero character unless otherwise noted.


Constructor Summary
AnsiString()
          Constructs string with maximum length of 256 characters
AnsiString(AnsiString t)
          Constructs a copy of specified AnsiString object
AnsiString(int maxLen)
          Constructs string with specified maximum length
AnsiString(java.lang.String s)
          Constructs string with specified value.
AnsiString(java.lang.String s, int maxLen)
          Constructs string with specified value and maximum length
 
Method Summary
protected  java.lang.String bytesToString(byte[] bytes)
           
 java.lang.Object clone()
           
protected  int getStrLen(DataBuffer dataBuffer, int startOffset)
           
protected  byte[] stringToBytes(java.lang.String value)
           
 
Methods inherited from class com.jniwrapper.ZeroTerminatedString
asReturnValue, equals, getAlignedLength, getCharLength, getLength, getMaxLength, getValue, pop, push, read, setValue, toString, write
 
Methods inherited from class com.jniwrapper.Parameter
acceptIOPerformer, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnsiString

public AnsiString()
Constructs string with maximum length of 256 characters


AnsiString

public AnsiString(int maxLen)
Constructs string with specified maximum length


AnsiString

public AnsiString(java.lang.String s)
Constructs string with specified value. Maximum length of the string equals the length of the specified value (including terminating zero).


AnsiString

public AnsiString(java.lang.String s,
                  int maxLen)
Constructs string with specified value and maximum length


AnsiString

public AnsiString(AnsiString t)
Constructs a copy of specified AnsiString object

Method Detail

bytesToString

protected java.lang.String bytesToString(byte[] bytes)
Specified by:
bytesToString in class ZeroTerminatedString

stringToBytes

protected byte[] stringToBytes(java.lang.String value)
Specified by:
stringToBytes in class ZeroTerminatedString

clone

public java.lang.Object clone()
Specified by:
clone in class Parameter

getStrLen

protected int getStrLen(DataBuffer dataBuffer,
                        int startOffset)
Specified by:
getStrLen in class ZeroTerminatedString