org.sblim.slp.internal.msg
Class SLPInputStream

java.lang.Object
  extended byorg.sblim.slp.internal.msg.SLPInputStream

public class SLPInputStream
extends java.lang.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(java.net.DatagramPacket pPacket)
          Ctor.
SLPInputStream(java.io.InputStream pInStr)
          Ctor.
SLPInputStream(java.net.Socket pSock)
          Ctor.
 
Method Summary
 int read16()
          read16
 int read24()
          read24
 long read32()
          read32
 int read8()
          read8
 ServiceLocationAttribute readAttribute()
          readAttribute
 java.util.List readAttributeList()
          readAttributeList
 java.util.List readAuthBlockList()
          # of AttrAuths |(if present) Attribute Authentication Blocks...
 ServiceType readServiceType()
          readServiceType
 java.util.List readServTypeList()
          readServTypeList
 java.lang.String readString()
          readString
 java.util.List readStringList()
          readStringList
 java.util.SortedSet readStringSet()
          readStringSet
 ServiceURL readURL()
           
 java.util.List readUrlList(java.util.List 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(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


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