org.sblim.slp.internal.msg
Class SLPInputStream

java.lang.Object
  extended by org.sblim.slp.internal.msg.SLPInputStream

public class SLPInputStream
extends Object

Helps the parsing of the bytes of SLP messages.


Constructor Summary
SLPInputStream(byte[] pBytes)
          Ctor.
SLPInputStream(byte[] pBytes, int pOffset, int pLength)
          Ctor.
SLPInputStream(DatagramPacket pPacket)
          Ctor.
SLPInputStream(InputStream pInStr)
          Ctor.
SLPInputStream(Socket pSock)
          Ctor.
 
Method Summary
 int read16()
          read16
 int read24()
          read24
 long read32()
          read32
 int read8()
          read8
 ServiceLocationAttribute readAttribute()
          readAttribute
 List<ServiceLocationAttribute> readAttributeList()
          readAttributeList
 List<?> readAuthBlockList()
          # of AttrAuths |(if present) Attribute Authentication Blocks...
 ServiceType readServiceType()
          readServiceType
 List<ServiceType> readServTypeList()
          readServTypeList
 String readString()
          readString
 List<String> readStringList()
          readStringList
 SortedSet<String> readStringSet()
          readStringSet
 ServiceURL readURL()
           
 List<ServiceURL> readUrlList(List<Exception> pURLExceptions)
          readUrlList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SLPInputStream

public SLPInputStream(byte[] pBytes)
Ctor.

Parameters:
pBytes -

SLPInputStream

public SLPInputStream(Socket pSock)
               throws IOException
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

readString

public String readString()
                  throws ServiceLocationException,
                         IOException
readString

Returns:
String
Throws:
ServiceLocationException
IOException

readStringSet

public SortedSet<String> readStringSet()
                                throws ServiceLocationException,
                                       IOException
readStringSet

Returns:
SortedSet of Strings
Throws:
ServiceLocationException
IOException

readStringList

public List<String> readStringList()
                            throws ServiceLocationException,
                                   IOException
readStringList

Returns:
List of Strings
Throws:
ServiceLocationException
IOException

readAttribute

public ServiceLocationAttribute readAttribute()
                                       throws ServiceLocationException,
                                              IOException
readAttribute

Returns:
ServiceLocationAttribute
Throws:
ServiceLocationException
IOException

readAttributeList

public List<ServiceLocationAttribute> readAttributeList()
                                                 throws ServiceLocationException,
                                                        IOException
readAttributeList

Returns:
List of ServiceLocationAttributes
Throws:
ServiceLocationException
IOException

readAuthBlockList

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

Returns:
null
Throws:
ServiceLocationException
IOException

readURL

public ServiceURL readURL()
                   throws ServiceLocationException,
                          IOException
Returns:
ServiceURL
Throws:
ServiceLocationException
IOException

readUrlList

public List<ServiceURL> readUrlList(List<Exception> pURLExceptions)
                             throws ServiceLocationException,
                                    IOException
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

readServiceType

public ServiceType readServiceType()
                            throws ServiceLocationException,
                                   IOException
readServiceType

Returns:
ServiceType
Throws:
ServiceLocationException
IOException

readServTypeList

public List<ServiceType> readServTypeList()
                                   throws ServiceLocationException,
                                          IOException
readServTypeList

Returns:
List of ServiceTypes
Throws:
ServiceLocationException
IOException

read8

public int read8()
          throws ServiceLocationException,
                 IOException
read8

Returns:
int
Throws:
ServiceLocationException
IOException

read16

public int read16()
           throws ServiceLocationException,
                  IOException
read16

Returns:
int
Throws:
ServiceLocationException
IOException

read24

public int read24()
           throws ServiceLocationException,
                  IOException
read24

Returns:
int
Throws:
ServiceLocationException
IOException

read32

public long read32()
            throws ServiceLocationException,
                   IOException
read32

Returns:
long
Throws:
ServiceLocationException
IOException


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