|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDirInfo
Represents a set of "directory information," used for searching for buddies by various fields.
Constructor Summary | |
|
DirInfo(java.lang.String email,
java.lang.String first,
java.lang.String middle,
java.lang.String last,
java.lang.String maiden,
java.lang.String nickname,
java.lang.String address,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String country,
java.lang.String language)
Creates a new directory info object with the given properties and no associated screenname. |
|
DirInfo(java.lang.String sn,
java.lang.String email,
java.lang.String first,
java.lang.String middle,
java.lang.String last,
java.lang.String maiden,
java.lang.String nickname,
java.lang.String address,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String country,
java.lang.String language)
Creates a new directory info object with the given properties. |
protected |
DirInfo(java.lang.String sn,
java.lang.String email,
java.lang.String first,
java.lang.String middle,
java.lang.String last,
java.lang.String maiden,
java.lang.String nickname,
java.lang.String address,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String country,
java.lang.String language,
int totalSize)
Creates a new directory info object with the given properties. |
Method Summary | |
java.lang.String |
getCity()
Returns the city of residence field of this directory info block. |
java.lang.String |
getCountryCode()
Returns the country-code field of this directory info block. |
java.lang.String |
getEmail()
Returns the email address field of this directory info block. |
java.lang.String |
getFirstname()
Returns the first-name field of this directory info block. |
java.lang.String |
getLanguageCode()
Returns the language-code field of this directory info block. |
java.lang.String |
getLastname()
Returns the last-name field of this directory info block. |
java.lang.String |
getMaiden()
Returns the maiden-name field of this directory info block. |
java.lang.String |
getMiddlename()
Returns the middle-name field of this directory info block. |
java.lang.String |
getNickname()
Returns the nickname field of this directory info block. |
java.lang.String |
getScreenname()
Returns the screenname holding this directory information. |
java.lang.String |
getState()
Returns the state field of this directory info block. |
java.lang.String |
getStreetAddress()
Returns the street-address field of this directory info block. |
int |
getTlvCount()
Returns the total number of TLV's that will be or have been written using write . |
int |
getTotalSize()
Returns the total number of bytes this directory information object used when read from a byte block. |
java.lang.String |
getZip()
Returns the zip-code field of this directory info block. |
static DirInfo |
readDirInfo(ByteBlock block)
Reads a directory information entry from the given block. |
static DirInfo |
readDirInfo(ByteBlock block,
int maxTlvs)
Reads a directory information block from the given block, only reading the given number of TLV's from the block. |
static DirInfo |
readDirInfo(TlvChain chain)
Generates a DirInfo object from the TLV's in the given
chain. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected DirInfo(java.lang.String sn, java.lang.String email, java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String maiden, java.lang.String nickname, java.lang.String address, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String country, java.lang.String language, int totalSize)
null
to avoid using the given field or
to indicate that the given field was not included in the directory info
block.
sn
- the screenname having this directory informationemail
- the email address of this userfirst
- this user's first namemiddle
- the user's middle namelast
- the user's last namemaiden
- the user's maiden namenickname
- the user's nicknameaddress
- the user's street addresscity
- the user's city of residencestate
- the user's state of residence, in any format ("NY" and "New
York" are both valid)zip
- the user's zip codecountry
- the user's country of residence, as a two-letter country
codelanguage
- the user's language, as a two-letter code such as "en"
(for English)totalSize
- the total size of the directory information block, as
read from some sort of stream or data blockpublic DirInfo(java.lang.String email, java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String maiden, java.lang.String nickname, java.lang.String address, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String country, java.lang.String language)
null
to avoid sending the given field.
email
- the email address of this userfirst
- this user's first namemiddle
- the user's middle namelast
- the user's last namemaiden
- the user's maiden namenickname
- the user's nicknameaddress
- the user's street addresscity
- the user's city of residencestate
- the user's state of residence, in any format ("NY" and "New
York" are both valid)zip
- the user's zip codecountry
- the user's country of residence, as a two-letter country
codelanguage
- the user's language, as a two-letter code such as "en"
(for English)public DirInfo(java.lang.String sn, java.lang.String email, java.lang.String first, java.lang.String middle, java.lang.String last, java.lang.String maiden, java.lang.String nickname, java.lang.String address, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String country, java.lang.String language)
null
to avoid sending the given field.
sn
- the screenname holding this directory informationemail
- the email address of this userfirst
- this user's first namemiddle
- the user's middle namelast
- the user's last namemaiden
- the user's maiden namenickname
- the user's nicknameaddress
- the user's street addresscity
- the user's city of residencestate
- the user's state of residence, in any format ("NY" and "New
York" are both valid)zip
- the user's zip codecountry
- the user's country of residence, as a two-letter country
codelanguage
- the user's language, as a two-letter code such as "en"
(for English)Method Detail |
public static DirInfo readDirInfo(ByteBlock block)
readDirInfo(TlvChain.readChain(block))
. The total number of bytes read
can be retrieved by calling getTotalSize
on the returned
object.
block
- the data block containing directory information
public static DirInfo readDirInfo(ByteBlock block, int maxTlvs)
readDirInfo(TlvChain.readChain(block,
maxTlvs))
. The total number of bytes read can be retrieved by calling
getTotalSize
on the returned object.
block
- the block of data from which to readmaxTlvs
- the maximum number of TLV's to read from the block
public static DirInfo readDirInfo(TlvChain chain)
DirInfo
object from the TLV's in the given
chain. (A directory info block consists solely of a series of TLV's.)
Note that if no TLV's are present in the given chain, null
is returned.
chain
- the TLV chain containing directory information TLV's
public final java.lang.String getScreenname()
public final java.lang.String getEmail()
public final java.lang.String getFirstname()
public final java.lang.String getMiddlename()
public final java.lang.String getLastname()
public final java.lang.String getMaiden()
public final java.lang.String getNickname()
public final java.lang.String getStreetAddress()
public final java.lang.String getCity()
public final java.lang.String getState()
public final java.lang.String getZip()
public final java.lang.String getCountryCode()
public final java.lang.String getLanguageCode()
public final int getTotalSize()
-1
if this info
block was not read using any of the readDirInfo
forms.
public final int getTlvCount()
write
.
write
public void write(java.io.OutputStream out) throws java.io.IOException
LiveWritable
write
in interface LiveWritable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |