Secure iNet Factory

com.jscape.inet.terminal
Class CSIType

java.lang.Object
  extended by com.jscape.inet.terminal.CSIType
All Implemented Interfaces:
SequenceType

public class CSIType
extends java.lang.Object
implements SequenceType

Sequence type with '[' second character. "Canonical" representation: "\033[Pn;PnC", where Pn - decimal number, C - alpha character. Sequence is complete when any alpha character came. "Singleton" pattern [Gamma94].


Method Summary
 java.lang.String getCanonicalForm(java.lang.StringBuffer value)
          Returns "canonical" form of control sequence (i.e.
static CSIType getInstance()
          Returns one and only one instance of this type.
 int[] getParameters(java.lang.StringBuffer value)
          Extracts and returns sequence parameters as array of int.
 boolean isComplete(java.lang.StringBuffer value)
          Checks if sequence is complete.
 void setParameterDelim(java.lang.String delim)
          Sets parameter delimeter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CSIType getInstance()
Returns one and only one instance of this type.

Returns:
one and only one instance of CSIType object.

isComplete

public boolean isComplete(java.lang.StringBuffer value)
Checks if sequence is complete.

Specified by:
isComplete in interface SequenceType
Parameters:
value - sequence value.
Returns:
true if sequence is complete.

getParameters

public int[] getParameters(java.lang.StringBuffer value)
Extracts and returns sequence parameters as array of int.

Specified by:
getParameters in interface SequenceType
Parameters:
value - sequence value.
Returns:
array of int.

getCanonicalForm

public java.lang.String getCanonicalForm(java.lang.StringBuffer value)
Returns "canonical" form of control sequence (i.e. without parameters). For example: having "\033[0;7m" incoming sequence its "canonical" form will be "\033[m".

Specified by:
getCanonicalForm in interface SequenceType
Parameters:
value - sequence value.
Returns:
string with "canonical" sequence form.

setParameterDelim

public void setParameterDelim(java.lang.String delim)
Sets parameter delimeter.

Parameters:
delim - string with parameter delimeter.

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved