Package org.sblim.slp.internal.msg
Class SLPInputStream
- java.lang.Object
-
- org.sblim.slp.internal.msg.SLPInputStream
-
public class SLPInputStream extends java.lang.Object
Helps the parsing of the bytes of SLP messages.
-
-
Constructor Summary
Constructors Constructor Description SLPInputStream(byte[] pBytes)
Ctor.SLPInputStream(byte[] pBytes, int pOffset, int pLength)
Ctor.SLPInputStream(java.io.InputStream pInStr)
Ctor.SLPInputStream(java.net.DatagramPacket pPacket)
Ctor.SLPInputStream(java.net.Socket pSock)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
read16()
read16int
read24()
read24long
read32()
read32int
read8()
read8ServiceLocationAttribute
readAttribute()
readAttributejava.util.List
readAttributeList()
readAttributeListjava.util.List
readAuthBlockList()
# of AttrAuths |(if present) Attribute Authentication Blocks...ServiceType
readServiceType()
readServiceTypejava.util.List
readServTypeList()
readServTypeListjava.lang.String
readString()
readStringjava.util.List
readStringList()
readStringListjava.util.SortedSet
readStringSet()
readStringSetServiceURL
readURL()
java.util.List
readUrlList(java.util.List pURLExceptions)
readUrlList
-
-
-
Constructor Detail
-
SLPInputStream
public SLPInputStream(byte[] pBytes)
Ctor.- Parameters:
pBytes
-
-
SLPInputStream
public SLPInputStream(java.net.Socket pSock) throws java.io.IOException
Ctor.- Parameters:
pSock
-- Throws:
java.io.IOException
-
SLPInputStream
public SLPInputStream(java.io.InputStream pInStr)
Ctor.- Parameters:
pInStr
-
-
SLPInputStream
public SLPInputStream(java.net.DatagramPacket pPacket)
Ctor.- Parameters:
pPacket
-
-
SLPInputStream
public SLPInputStream(byte[] pBytes, int pOffset, int pLength)
Ctor.- Parameters:
pBytes
-pOffset
-pLength
-
-
-
Method Detail
-
readString
public java.lang.String readString() throws ServiceLocationException, java.io.IOException
readString- Returns:
- String
- Throws:
ServiceLocationException
java.io.IOException
-
readStringSet
public java.util.SortedSet readStringSet() throws ServiceLocationException, java.io.IOException
readStringSet- Returns:
- SortedSet of Strings
- Throws:
ServiceLocationException
java.io.IOException
-
readStringList
public java.util.List readStringList() throws ServiceLocationException, java.io.IOException
readStringList- Returns:
- List of Strings
- Throws:
ServiceLocationException
java.io.IOException
-
readAttribute
public ServiceLocationAttribute readAttribute() throws ServiceLocationException, java.io.IOException
readAttribute- Returns:
- ServiceLocationAttribute
- Throws:
ServiceLocationException
java.io.IOException
-
readAttributeList
public java.util.List readAttributeList() throws ServiceLocationException, java.io.IOException
readAttributeList- Returns:
- List of ServiceLocationAttributes
- Throws:
ServiceLocationException
java.io.IOException
-
readAuthBlockList
public java.util.List readAuthBlockList() throws ServiceLocationException, java.io.IOException
# of AttrAuths |(if present) Attribute Authentication Blocks...- Returns:
- null
- Throws:
ServiceLocationException
java.io.IOException
-
readURL
public ServiceURL readURL() throws ServiceLocationException, java.io.IOException
- Returns:
- ServiceURL
- Throws:
ServiceLocationException
java.io.IOException
-
readUrlList
public java.util.List readUrlList(java.util.List pURLExceptions) throws ServiceLocationException, java.io.IOException
readUrlList- Returns:
- List of valid ServiceURLs
- Throws:
ServiceLocationException
java.io.IOException
- Add URL to list only if it is valid URL i.e. no exception is thrown by parser
-
readServiceType
public ServiceType readServiceType() throws ServiceLocationException, java.io.IOException
readServiceType- Returns:
- ServiceType
- Throws:
ServiceLocationException
java.io.IOException
-
readServTypeList
public java.util.List readServTypeList() throws ServiceLocationException, java.io.IOException
readServTypeList- Returns:
- List of ServiceTypes
- Throws:
ServiceLocationException
java.io.IOException
-
read8
public int read8() throws ServiceLocationException, java.io.IOException
read8- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read16
public int read16() throws ServiceLocationException, java.io.IOException
read16- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read24
public int read24() throws ServiceLocationException, java.io.IOException
read24- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read32
public long read32() throws ServiceLocationException, java.io.IOException
read32- Returns:
- long
- Throws:
ServiceLocationException
java.io.IOException
-
-