org.sblim.slp.internal.msg

Class SLPInputStream

public class SLPInputStream extends Object

Helps the parsing of the bytes of SLP messages.
Constructor Summary
SLPInputStream(byte[] pBytes)
Ctor.
SLPInputStream(Socket pSock)
Ctor.
SLPInputStream(InputStream pInStr)
Ctor.
SLPInputStream(DatagramPacket pPacket)
Ctor.
SLPInputStream(byte[] pBytes, int pOffset, int pLength)
Ctor.
Method Summary
intread16()
read16
intread24()
read24
longread32()
read32
intread8()
read8
ServiceLocationAttributereadAttribute()
readAttribute
List<ServiceLocationAttribute>readAttributeList()
readAttributeList
List<?>readAuthBlockList()
# of AttrAuths |(if present) Attribute Authentication Blocks...
ServiceTypereadServiceType()
readServiceType
List<ServiceType>readServTypeList()
readServTypeList
StringreadString()
readString
List<String>readStringList()
readStringList
SortedSet<String>readStringSet()
readStringSet
List<ServiceURL>readUrlList(List<Exception> pURLExceptions)
readUrlList
ServiceURLreadURL()

Constructor Detail

SLPInputStream

public SLPInputStream(byte[] pBytes)
Ctor.

Parameters: pBytes

SLPInputStream

public SLPInputStream(Socket pSock)
Ctor.

Parameters: pSock

Throws: IOException

SLPInputStream

public SLPInputStream(InputStream pInStr)
Ctor.

Parameters: pInStr

SLPInputStream

public SLPInputStream(DatagramPacket pPacket)
Ctor.

Parameters: pPacket

SLPInputStream

public SLPInputStream(byte[] pBytes, int pOffset, int pLength)
Ctor.

Parameters: pBytes pOffset pLength

Method Detail

read16

public int read16()
read16

Returns: int

Throws: ServiceLocationException IOException

read24

public int read24()
read24

Returns: int

Throws: ServiceLocationException IOException

read32

public long read32()
read32

Returns: long

Throws: ServiceLocationException IOException

read8

public int read8()
read8

Returns: int

Throws: ServiceLocationException IOException

readAttribute

public ServiceLocationAttribute readAttribute()
readAttribute

Returns: ServiceLocationAttribute

Throws: ServiceLocationException IOException

readAttributeList

public List<ServiceLocationAttribute> readAttributeList()
readAttributeList

Returns: List of ServiceLocationAttributes

Throws: ServiceLocationException IOException

readAuthBlockList

public List<?> readAuthBlockList()
# of AttrAuths |(if present) Attribute Authentication Blocks...

Returns: null

Throws: ServiceLocationException IOException

readServiceType

public ServiceType readServiceType()
readServiceType

Returns: ServiceType

Throws: ServiceLocationException IOException

readServTypeList

public List<ServiceType> readServTypeList()
readServTypeList

Returns: List of ServiceTypes

Throws: ServiceLocationException IOException

readString

public String readString()
readString

Returns: String

Throws: ServiceLocationException IOException

readStringList

public List<String> readStringList()
readStringList

Returns: List of Strings

Throws: ServiceLocationException IOException

readStringSet

public SortedSet<String> readStringSet()
readStringSet

Returns: SortedSet of Strings

Throws: ServiceLocationException IOException

readUrlList

public List<ServiceURL> readUrlList(List<Exception> pURLExceptions)
readUrlList

Parameters: pURLExceptions

Returns: List of valid ServiceURLs

Throws: ServiceLocationException IOException Add URL to list only if it is valid URL i.e. no exception is thrown by parser

readURL

public ServiceURL readURL()

Returns: ServiceURL

Throws: ServiceLocationException IOException

Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.