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
ConstructorsConstructorDescriptionSLPInputStream
(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
Modifier and TypeMethodDescriptionint
read16()
read16int
read24()
read24long
read32()
read32int
read8()
read8readAttributejava.util.List<ServiceLocationAttribute>
readAttributeListjava.util.List<?>
# of AttrAuths |(if present) Attribute Authentication Blocks...readServiceTypejava.util.List<ServiceType>
readServTypeListjava.lang.String
readStringjava.util.List<java.lang.String>
readStringListjava.util.SortedSet<java.lang.String>
readStringSetreadURL()
java.util.List<ServiceURL>
readUrlList
(java.util.List<java.lang.Exception> pURLExceptions) readUrlListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
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 Details
-
readString
readString- Returns:
- String
- Throws:
ServiceLocationException
java.io.IOException
-
readStringSet
public java.util.SortedSet<java.lang.String> readStringSet() throws ServiceLocationException, java.io.IOExceptionreadStringSet- Returns:
- SortedSet of Strings
- Throws:
ServiceLocationException
java.io.IOException
-
readStringList
public java.util.List<java.lang.String> readStringList() throws ServiceLocationException, java.io.IOExceptionreadStringList- Returns:
- List of Strings
- Throws:
ServiceLocationException
java.io.IOException
-
readAttribute
public ServiceLocationAttribute readAttribute() throws ServiceLocationException, java.io.IOExceptionreadAttribute- Returns:
- ServiceLocationAttribute
- Throws:
ServiceLocationException
java.io.IOException
-
readAttributeList
public java.util.List<ServiceLocationAttribute> readAttributeList() throws ServiceLocationException, java.io.IOExceptionreadAttributeList- Returns:
- List of ServiceLocationAttributes
- Throws:
ServiceLocationException
java.io.IOException
-
readAuthBlockList
# of AttrAuths |(if present) Attribute Authentication Blocks...- Returns:
- null
- Throws:
ServiceLocationException
java.io.IOException
-
readURL
- Returns:
- ServiceURL
- Throws:
ServiceLocationException
java.io.IOException
-
readUrlList
public java.util.List<ServiceURL> readUrlList(java.util.List<java.lang.Exception> pURLExceptions) throws ServiceLocationException, java.io.IOException readUrlList- Parameters:
pURLExceptions
-- 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
readServiceType- Returns:
- ServiceType
- Throws:
ServiceLocationException
java.io.IOException
-
readServTypeList
public java.util.List<ServiceType> readServTypeList() throws ServiceLocationException, java.io.IOExceptionreadServTypeList- Returns:
- List of ServiceTypes
- Throws:
ServiceLocationException
java.io.IOException
-
read8
read8- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read16
read16- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read24
read24- Returns:
- int
- Throws:
ServiceLocationException
java.io.IOException
-
read32
read32- Returns:
- long
- Throws:
ServiceLocationException
java.io.IOException
-