|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.monica.javacom.ssh.MJCSSHIO
Class for providing functionality either field conversion to String or from String according to the SSH2 specification, or some aspects of the SSH2 functionality that could not be put into any other class.
Constructor Summary | |
MJCSSHIO()
|
Method Summary | |
java.lang.String |
chosenMatch(java.lang.String s)
Returns the first element of the comma separated String s, or throws an Exception if s is empty. |
java.lang.String |
delNextToken(java.lang.String msg,
java.lang.String[] spaces)
This method deletes the left substring of msg that would be returned by getNextToken(msg, spaces) and the separaing space string at the end of the result from getNextToken as well (if there is any). |
java.lang.String |
findMatch(java.lang.String s1,
java.lang.String s2,
int pri)
Let s1 and s2 be two comma separated Strings. |
java.lang.String |
getNextToken(java.lang.String msg,
java.lang.String[] spaces)
Let msg be a String that can contain separating space Strings. |
java.util.Vector |
parsePayload(java.lang.String payload,
java.lang.String[] desc)
Parses an unencoded SSH2 payload String and returns a Vector containing the elements of the payload as different Objects. |
java.lang.String |
print(java.lang.String s)
Coverts a String s interpreted as an unsigned number in 256 radix to a String r representing an unsigned number in 16 radix with the number signs "0"..."9" and "A"..."F". |
boolean |
rBoolean(java.lang.String s)
Creates a boolean from a String encoded as specified in the SSH2 specification and beginning with a BOOLEAN. |
java.math.BigInteger |
rByte(java.lang.String s)
Creates a BigInteger from a String ancoded as specified in the SSH2 specification and beginning with an SSH2 BYTE. |
int |
rByteInt(java.lang.String s)
Creates an int from a String encoded as specified int the SSH2 specification and beginning with an SSH2 BYTE. |
java.math.BigInteger |
rMpint(java.lang.String s)
Creates a BigInteger from a String encoded as specified in the SSH2 specification and beginning with an MPINT. |
java.lang.String |
rString(java.lang.String s)
Creates a String from a String encoded as specified in the SSH2 specification and beginning with a STRING. |
java.math.BigInteger |
rUint32(java.lang.String s)
Creates a BigInteger from a String encoded as specified in the SSH2 specification and beginning with an UINT32. |
int |
rUint32Int(java.lang.String s)
Creates an int from a String encoded as specified in the SSH2 specification and beginning with an UINT32. |
java.math.BigInteger |
rUint64(java.lang.String s)
Creates a BigInteger from a String encoed as specified in the SSH2 specification and beginning with an UINT64. |
long |
rUint64Long(java.lang.String s)
Creates a long from a String encoed as specified in the SSH2 specification and beginning with an UINT64. |
java.math.BigInteger |
stringAsBigInteger(java.lang.String s)
Creates a BigInteger from a String s. |
java.lang.String |
wBoolean(boolean b)
Creates a one byte String according to the SSH2 (BOOLEAN) specification from a boolean. |
java.lang.String |
wByte(int i)
Creates a one byte String according to the SSH2 (BYTE) specification from an int. |
java.lang.String |
wLowOrderUint32(int i)
Creates a four byte String from an int by writing the bytes in the low order way. |
java.lang.String |
wMpint(java.math.BigInteger bi)
Creates an arbitrary length String according to the SSH2 (MPINT) specification from a BigInteger. |
java.lang.String |
wString(java.lang.String s)
Creates an arbitrary length String according to the SSH2 (STRING) specification from a String. |
java.lang.String |
wUint32(int i)
Creates a four byte String according to the SSH2 (UINT32) specification from an int. |
java.lang.String |
wUint64(long l)
Creates an eight byte String according to the SSH2 (UINT64) specification from a long. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MJCSSHIO()
Method Detail |
public java.lang.String wByte(int i)
public java.lang.String wBoolean(boolean b)
boolean
- b: the boolean to be converted to Stringpublic java.lang.String wUint32(int i)
int
- i: the int to be converted to Stringpublic java.lang.String wLowOrderUint32(int i)
int
- i: the int to be converted to Stringpublic java.lang.String wUint64(long l)
long
- l: the long to be converted to Stringpublic java.lang.String wString(java.lang.String s)
String
- s: the String to be converted to Stringpublic java.lang.String wMpint(java.math.BigInteger bi)
BigInteger
- bi: the BigInteger to be converted to Stringpublic java.math.BigInteger rByte(java.lang.String s)
String
- s: the String containing the BYTEpublic int rByteInt(java.lang.String s)
String
- s: the String containing the BYTEpublic boolean rBoolean(java.lang.String s)
String
- s: the String containing the BYTEpublic java.math.BigInteger rUint32(java.lang.String s)
String
- s: the String containing the UINT32public int rUint32Int(java.lang.String s)
String
- s: the String containing the UINT32public java.math.BigInteger rUint64(java.lang.String s)
String
- s: the String containing the UINT64public long rUint64Long(java.lang.String s)
String
- s: the String containing the UINT64public java.lang.String rString(java.lang.String s)
String
- s: the String containing the STRINGpublic java.math.BigInteger rMpint(java.lang.String s)
String
- s: the String containing the MPINTpublic java.util.Vector parsePayload(java.lang.String payload, java.lang.String[] desc)
String
- payload: the full payload StringString[]
- desc: the String array describing the payload's structurepublic java.lang.String findMatch(java.lang.String s1, java.lang.String s2, int pri)
String
- s1: s1String
- s2: s2int
- pri: pripublic java.lang.String chosenMatch(java.lang.String s) throws java.lang.Exception
String
- s: the comma separated StringException:
- is s is emptypublic java.lang.String getNextToken(java.lang.String msg, java.lang.String[] spaces)
String
- msg: msgString[]
- spaces: separating space Stringspublic java.lang.String delNextToken(java.lang.String msg, java.lang.String[] spaces)
String
- msg: msgString[]
- spaces: separating space Stringspublic java.math.BigInteger stringAsBigInteger(java.lang.String s)
String
- s: String to be interpreted as an unsigned numberpublic java.lang.String print(java.lang.String s)
String
- s: the String to be interpreted as an unsigned number in 256 radix
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |