|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.ssh.types.SshNameList
public final class SshNameList
A string containing a comma separated list of names. A name list is represented as a uint32 containing its length (number of bytes that follow) followed by a comma-separated list of zero or more names. A name must be non-zero length, and it must not contain a comma (','). Context may impose additional restrictions on the names; for example, the names in a list may have to be valid algorithm identifier (see Section 6 below), or [RFC3066] language tags. The order of the names in a list may or may not be significant, also depending on the context where the list is is used. Terminating NUL characters are not used, neither for the individual names, nor for the list as a whole.
Constructor Summary | |
---|---|
SshNameList(java.lang.String[] names)
Creates a new SSH name list instance. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compares two objects for the logical equality. |
java.lang.String |
getFirstCommonNameFrom(SshNameList that)
Finds the first name that is common for the current and for the specified lists. |
java.lang.String[] |
getNames()
Obtains name list. |
int |
hashCode()
Computes object's hash code. |
static SshNameList |
readFrom(java.io.InputStream in)
Reads name list object from the stream. |
static java.lang.String[] |
readNamesFrom(java.io.InputStream in)
Reads name list from the stream and returns it as string array. |
static byte[] |
readValue(java.io.InputStream in)
Reads a value from the specified stream. |
static byte[] |
toByteArray(java.lang.String[] names)
|
java.lang.String |
toString()
Provides object string representation. |
static java.lang.String |
toString(byte[] data)
|
static java.lang.String[] |
toStringArray(byte[] data)
|
static void |
writeNamesTo(java.lang.String[] names,
java.io.OutputStream out)
Writes specified name array to the stream. |
void |
writeTo(java.io.OutputStream out)
Writes the current SSH names list value to the stream. |
static void |
writeValue(byte[] value,
java.io.OutputStream out)
Writes the specified value to the stream. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SshNameList(java.lang.String[] names)
names
- instance namesMethod Detail |
---|
public static byte[] readValue(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if a error occurspublic static void writeValue(byte[] value, java.io.OutputStream out) throws java.io.IOException
value
- value to writeout
- output stream
java.io.IOException
- if an error occurspublic static byte[] toByteArray(java.lang.String[] names)
public static java.lang.String[] toStringArray(byte[] data)
public static java.lang.String toString(byte[] data)
public static java.lang.String[] readNamesFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static SshNameList readFrom(java.io.InputStream in) throws java.io.IOException
in
- input stream
java.io.IOException
- if I/O error occurspublic static void writeNamesTo(java.lang.String[] names, java.io.OutputStream out) throws java.io.IOException
names
- name array to writeout
- output stream
java.io.IOException
- if I/O error occurspublic java.lang.String[] getNames()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare
true
if objects are logically equal;
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- object to be compared
public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- output stream
java.io.IOException
- if I/O error occurspublic java.lang.String getFirstCommonNameFrom(SshNameList that)
that
- name list
java.util.NoSuchElementException
- if there's no common names
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |