public class SipParser extends Object
Buffer. The consume-functions will (if successful) move the reader
index of the Buffer. If unsuccessful, the reader index will be left untouched.SipParseException to indicate that things
didn't turn out as we were hoping for. Also, remember that the SipParseException contains
the error offset into the Buffer where things broke. As with the consume-functions, the
expect-functions will (if successful) move the reader index of the Buffer| Modifier and Type | Field and Description |
|---|---|
static byte |
AT |
static byte |
BACK_SLASH |
static byte |
BACKTICK |
static byte |
COLON |
static byte |
COMMA |
static byte |
CR |
static byte |
DASH |
static byte |
DOUBLE_QOUTE |
static byte |
DQUOT
Double quotation mark
|
static byte |
EQ |
static byte |
EXCLAMATIONPOINT |
static Map<Buffer,java.util.function.Function<SipHeader,? extends SipHeader>> |
framers |
static byte |
HTAB |
static byte |
LAQUOT
Left angle quote
|
static byte |
LF |
static byte |
LPAREN
Left parenthesis
|
static Buffer |
MADDR |
static int |
MAX_LOOK_AHEAD
There are many situations where you are looking to frame something but
you cannot find the terminating condition.
|
static Buffer |
METHOD |
static byte |
PERCENT |
static byte |
PERIOD |
static byte |
PLUS |
static byte |
QUESTIONMARK |
static byte |
RAQUOT
Right angle quote
|
static byte |
RPAREN
Right parenthesis
|
static Buffer |
SCHEME_SIP |
static Buffer |
SCHEME_SIP_COLON |
static Buffer |
SCHEME_SIPS |
static Buffer |
SCHEME_SIPS_COLON |
static Buffer |
SCTP |
static byte |
SEMI |
static Buffer |
SIP2_0 |
static Buffer |
SIP2_0_SLASH |
static byte |
SLASH |
static byte |
SP |
static byte |
STAR |
static Buffer |
TCP |
static byte |
TICK |
static byte |
TILDE |
static Buffer |
TLS |
static Buffer |
TRANSPORT |
static Buffer |
TRANSPORT_EQ |
static Buffer |
TTL |
static Buffer |
UDP |
static byte |
UNDERSCORE |
static Buffer |
USER |
static Buffer |
WS |
| Constructor and Description |
|---|
SipParser() |
| Modifier and Type | Method and Description |
|---|---|
static Buffer |
consumeAddressSpec(Buffer buffer)
Consumes addr-spec, which according to RFC3261 section 25.1 is:
|
static Buffer |
consumeAlphaNum(Buffer buffer)
Consumes a alphanum.
|
static int |
consumeCOLON(Buffer buffer)
Consume colon (COLON), which according to RFC3261 section 25.1 Basic
Rules is:
COLON = SWS ":" SWS ; colon
|
static int |
consumeCOMMA(Buffer buffer)
Consume comma (COMMA), which according to RFC3261 section 25.1 Basic
Rules is:
COMMA = SWS "," SWS ; comma
|
static int |
consumeCRLF(Buffer buffer)
Consume CR + LF
|
static Buffer |
consumeDisplayName(Buffer buffer)
The display name in SIP is a little tricky since it may or may not be
there and the stuff following it (whether or not it was there to begin
with) can easily be confused with being a display name.
|
static int |
consumeEQUAL(Buffer buffer)
Consume equal sign (EQUAL), which according to RFC3261 section 25.1 Basic
Rules is:
EQUAL = SWS "=" SWS ; equal
|
static Buffer[] |
consumeGenericParam(Buffer buffer)
Consumes a generic param, which according to RFC 3261 section 25.1 is:
|
static List<Buffer[]> |
consumeGenericParams(Buffer buffer)
Consumes all generic-params it can find.
|
static Buffer |
consumeHostname(Buffer buffer) |
static int |
consumeLAQUOT(Buffer buffer)
Consume left angle quote (LAQUOT), which according to RFC3261 section
25.1 Basic Rules is:
LAQUOT = SWS "<"; left angle quote
|
static int |
consumeLDQUOT(Buffer buffer)
Consume open double quotation mark (LDQUT), which according to RFC3261
section 25.1 Basic Rules is:
LDQUOT = SWS DQUOTE; open double quotation mark
|
static int |
consumeLPAREN(Buffer buffer)
Consume left parenthesis (LPAREN), which according to RFC3261 section
25.1 Basic Rules is:
LPAREN = SWS "(" SWS ; left parenthesis
|
static int |
consumeLWS(Buffer buffer)
Consume linear whitespace (LWS), which according to RFC3261 section 25.1
Basic Rules is:
LWS = [*WSP CRLF] 1*WSP ; linear whitespace
|
static Buffer |
consumeMSubtype(Buffer buffer)
Consume a m-subtype, which according to RFC3261 section 25.1 Basic Rules
is:
|
static Buffer |
consumeMType(Buffer buffer)
Consume a m-type, which according to RFC3261 section 25.1 Basic Rules is:
|
static Buffer |
consumePort(Buffer buffer)
Consume a port, which according to RFC 3261 is:
port = 1*DIGIT
|
static Buffer |
consumeQuotedString(Buffer buffer)
Consumes a quoted-string, which is defined as:
|
static int |
consumeRAQUOT(Buffer buffer)
Consume right angle quote (RAQUOT), which according to RFC3261 section
25.1 Basic Rules is:
RAQUOT = SWS ">"; left angle quote
|
static int |
consumeRDQUOT(Buffer buffer)
Consume close double quotation mark (RDQUT), which according to RFC3261
section 25.1 Basic Rules is:
RDQUOT = DQUOTE SWS ; close double quotation mark
|
static int |
consumeRPAREN(Buffer buffer)
Consume right parenthesis (RPAREN), which according to RFC3261 section
25.1 Basic Rules is:
RPAREN = SWS ")" SWS ; right parenthesis
|
static int |
consumeSEMI(Buffer buffer)
Consume semicolon (SEMI), which according to RFC3261 section 25.1 Basic
Rules is:
SEMI = SWS ";" SWS ; semicolon
|
static Buffer[] |
consumeSentBye(Buffer buffer)
Consume a sent-by which according to 3261 is:
|
static Buffer |
consumeSentProtocol(Buffer buffer)
Consume the "sent-protocol", which according to RFC 3261 is:
|
static int |
consumeSLASH(Buffer buffer)
Consume an slash (SLASH), which according to RFC3261 section 25.1 Basic
Rules is:
SLASH = SWS "/" SWS ; slash
|
static int |
consumeSTAR(Buffer buffer)
Consume an asterisk/star (STAR), which according to RFC3261 section 25.1
Basic Rules is:
STAR = SWS "*" SWS ; asterisk
|
static int |
consumeSWS(Buffer buffer)
Consume sep (separating?) whitespace (LWS), which according to RFC3261
section 25.1 Basic Rules is:
SWS = [LWS] ; sep whitespace
"The SWS construct is used when linear white space is optional, generally
between tokens and separators." (RFC3261)
|
static Buffer |
consumeToken(Buffer buffer)
Consume a token, which according to RFC3261 section 25.1 Basic Rules is:
token = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'"
/ "~" )
|
static Buffer[] |
consumeUserInfoHostPort(Buffer buffer)
Consume the userinfo and hostport.
|
static Object[] |
consumeVia(Buffer buffer)
Consume a Via-header, which according to RFC3261 is:
|
static int |
consumeWS(Buffer buffer)
Consume all the whitespace we find (WS)
|
static boolean |
couldBeSipMessage(Buffer data)
Helper function that checks whether or not the data could be a SIP message.
|
static void |
expect(Buffer buffer,
byte expected)
Check so that the next byte in the passed in buffer is the expected one.
|
static void |
expect(Buffer buffer,
char ch)
Check so that the next byte in the passed in buffer is the expected one.
|
static Buffer |
expectDigit(Buffer buffer)
Will expect at least 1 digit and will continue consuming bytes until a
non-digit is encountered
|
static int |
expectHCOLON(Buffer buffer)
Convenience method for expecting (and consuming) a HCOLON, which is
defined as:
HCOLON = *( SP / HTAB ) ":" SWS
See RFC3261 section 25.1 Basic Rules
|
static Buffer |
expectMethod(Buffer buffer) |
static void |
expectSIP2_0(Buffer buffer)
Expect that the next set of bytes is "SIP/2.0" and if not then we will
throw a
SipParseException |
static void |
expectSLASH(Buffer buffer)
Convenience method for expecting (and consuming) a SLASH, which is
defined as:
See RFC3261 section 25.1 Basic Rules
|
static Buffer |
expectToken(Buffer buffer)
Expects a token, which according to RFC3261 section 25.1 Basic Rules is:
token = 1*(alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'"
/ "~" )
|
static int |
expectWS(Buffer buffer)
Expect the next byte to be a white space
|
static SipMessage |
frame(Buffer buffer)
Frame the supplied buffer into a
SipMessage. |
static int |
getAlphaNumCount(Buffer buffer)
Helper method that counts the number of bytes that are considered part of
the next alphanum block.
|
static int |
getTokenCount(Buffer buffer)
Helper method that counts the number of bytes that are considered part of
the next token in the
Buffer. |
static boolean |
isAlphaNum(byte b) |
static boolean |
isAlphaNum(char ch)
Helper method for checking whether the supplied byte is a alphanumeric
character or not.
|
static boolean |
isDigit(byte b) |
static boolean |
isDigit(char ch) |
static boolean |
isNext(Buffer buffer,
byte b)
Will check whether the next readable byte in the buffer is a certain byte
|
static boolean |
isNextAlphaNum(Buffer buffer)
Check whether next byte is a alpha numeric one.
|
static boolean |
isNextDigit(Buffer buffer)
Check whether the next byte is a digit or not
|
static boolean |
isSCTP(Buffer t) |
static boolean |
isSCTPLower(Buffer t) |
static boolean |
isSips(Buffer buffer) |
static boolean |
isTCP(Buffer t) |
static boolean |
isTCPLower(Buffer t) |
static boolean |
isTLS(Buffer t) |
static boolean |
isTLSLower(Buffer t) |
static boolean |
isUDP(Buffer t)
Check whether the buffer is exactly three bytes long and has the bytes "UDP" in it.
|
static boolean |
isUDPLower(Buffer t)
Check whether the buffer is exactly three bytes long and has the
bytes "udp" in it.
|
static boolean |
isWS(Buffer t) |
static boolean |
isWSLower(Buffer t) |
static SipHeader |
nextHeader(Buffer buffer)
Get the next header, which may actually be returning multiple if there
are multiple headers on the same line.
|
static List<SipHeader> |
nextHeaders(Buffer buffer) |
public static final int MAX_LOOK_AHEAD
public static final Buffer USER
public static final Buffer TTL
public static final Buffer MADDR
public static final Buffer METHOD
public static final Buffer TRANSPORT
public static final Buffer TRANSPORT_EQ
public static final Buffer SIP2_0
public static final Buffer SIP2_0_SLASH
public static final Buffer SCHEME_SIP
public static final Buffer SCHEME_SIP_COLON
public static final Buffer SCHEME_SIPS
public static final Buffer SCHEME_SIPS_COLON
public static final byte AT
public static final byte COLON
public static final byte SEMI
public static final byte DOUBLE_QOUTE
public static final byte CR
public static final byte LF
public static final byte SP
public static final byte HTAB
public static final byte DASH
public static final byte PERIOD
public static final byte COMMA
public static final byte EXCLAMATIONPOINT
public static final byte PERCENT
public static final byte STAR
public static final byte UNDERSCORE
public static final byte QUESTIONMARK
public static final byte PLUS
public static final byte BACKTICK
public static final byte TICK
public static final byte TILDE
public static final byte EQ
public static final byte SLASH
public static final byte BACK_SLASH
public static final byte LPAREN
public static final byte RPAREN
public static final byte RAQUOT
public static final byte LAQUOT
public static final byte DQUOT
public static final Buffer UDP
public static final Buffer TCP
public static final Buffer TLS
public static final Buffer SCTP
public static final Buffer WS
public static final Map<Buffer,java.util.function.Function<SipHeader,? extends SipHeader>> framers
public static void expectSIP2_0(Buffer buffer) throws SipParseException
SipParseExceptionbuffer - SipParseExceptionpublic static boolean isUDP(Buffer t)
t - public static boolean isTCP(Buffer t)
public static boolean isTLS(Buffer t)
public static boolean isWS(Buffer t)
public static boolean isSCTP(Buffer t)
public static boolean isUDPLower(Buffer t)
t - public static boolean isTCPLower(Buffer t)
public static boolean isTLSLower(Buffer t)
public static boolean isWSLower(Buffer t)
public static boolean isSCTPLower(Buffer t)
public static boolean isSips(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
public static List<Buffer[]> consumeGenericParams(Buffer buffer) throws IndexOutOfBoundsException, IOException
*( SEMI generic-param )E.g. in To:
To = ( "To" / "t" ) HCOLON ( name-addr / addr-spec ) *( SEMI to-param ) to-param = tag-param / generic-param
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static Buffer[] consumeGenericParam(Buffer buffer) throws IndexOutOfBoundsException, IOException
generic-param = token [ EQUAL gen-value ] gen-value = token / host / quoted-stringThe return value is two buffers returned as an array and if the second element is null (so make sure you check it!) then there was no value for this parameter. Also note that due to poor implementations out there, the following is accepted as valid input: foo= I.e., foo is a flag parameter and as such there should not be an equal sign following it but there are many servers out there that does this anyway.
buffer - the buffer from which we will consume a generic-paramIOExceptionIndexOutOfBoundsExceptionpublic static boolean isNext(Buffer buffer, byte b) throws IOException
buffer - the buffer to peek intob - the byte we are checking is the next byte in the buffer to be
readIOExceptionpublic static boolean isNextDigit(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static Buffer expectDigit(Buffer buffer) throws SipParseException
buffer - the buffer to consume the digits fromSipParseException - in case there is not one digit at the first position in the
buffer (where the current reader index is pointing to)IOExceptionIndexOutOfBoundsExceptionpublic static int expectHCOLON(Buffer buffer) throws SipParseException
SipParseExceptionpublic static void expectSLASH(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static int consumeSLASH(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int expectWS(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static int consumeSWS(Buffer buffer)
buffer - public static int consumeSTAR(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int consumeEQUAL(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int consumeLPAREN(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int consumeRPAREN(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int consumeRAQUOT(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int consumeLAQUOT(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int consumeCOMMA(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int consumeSEMI(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int consumeCOLON(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int consumeLDQUOT(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static int consumeRDQUOT(Buffer buffer) throws SipParseException, IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseExceptionpublic static Buffer expectToken(Buffer buffer) throws IndexOutOfBoundsException, IOException, SipParseException
buffer - IOExceptionIndexOutOfBoundsExceptionSipParseException - in case there is no tokenpublic static Buffer consumeQuotedString(Buffer buffer) throws SipParseException, IOException
quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII quoted-pair = "\" (%x00-09 / %x0B-0C / %x0E-7F)Note, this is a somewhat simplified version and we'll
buffer - IOExceptionSipParseExceptionpublic static Buffer consumeDisplayName(Buffer buffer) throws IOException, SipParseException
consumeToken(Buffer) in some cases)
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT display-name = *(token LWS)/ quoted-string
buffer - IOExceptionSipParseExceptionpublic static Buffer consumeAddressSpec(Buffer buffer) throws IndexOutOfBoundsException, IOException, SipParseException
addr-spec = SIP-URI / SIPS-URI / absoluteURI
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
SIPS-URI = "sips:" [ userinfo ] hostport
uri-parameters [ headers ]
absoluteURI = scheme ":" ( hier-part / opaque-part )
And as you can see, it gets complicated. Also, these consume-functions
are not to validate the exact grammar but rather to find the boundaries
so the strategy for consuming the addr-spec is:
IOExceptionIndexOutOfBoundsExceptionSipParseException - in case we cannot successfully frame the addr-spec.public static Buffer[] consumeUserInfoHostPort(Buffer buffer) throws SipParseException, IOException
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
SIPS-URI = "sips:" [ userinfo ] hostport
uri-parameters [ headers ]
userinfo = ( user / telephone-subscriber ) [ ":" password ] "@"
user = 1*( unreserved / escaped / user-unreserved )
user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
password = *( unreserved / escaped / "&" / "=" / "+" / "$" / "," )
hostport = host [ ":" port ]
As you can see, the user-unreserved is what mess things up. it would have
been way easier and more efficient if the user-unreserved wasn't there...buffer - SipParseExceptionIOExceptionpublic static Buffer consumeSentProtocol(Buffer buffer) throws IOException, SipParseException
sent-protocol = protocol-name SLASH protocol-version SLASH transport transport = "UDP" / "TCP" / "TLS" / "SCTP" / other-transport other-transport = tokenThe "sent-protocol" is only present in a Via header and typically looks like this: SIP/2.0/UDP The consume method will make sure that "SIP/2.0/" is present and if not, complain. The transport can really be anything and as such that is what you will get back as a return value. Hence, in the above example you would get back a buffer consisting of "UDP". Also note that the transport can be "other-transport" which translates to a "token" so we allow really anything and as such we will just consume and return the token after verifying that it start with the SIP/2.0 stuff.
buffer - IOExceptionSipParseException - in case anything goes wrong while parsing including if the
protocol-name isn't SIP and the version isn't 2.0public static Buffer consumeToken(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static Buffer consumeAlphaNum(Buffer buffer) throws IOException
buffer - IOExceptionpublic static Object[] consumeVia(Buffer buffer) throws SipParseException, IOException
Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm) via-parm = sent-protocol LWS sent-by *( SEMI via-params ) via-params = via-ttl / via-maddr / via-received / via-branch / via-extension via-ttl = "ttl" EQUAL ttl via-maddr = "maddr" EQUAL host via-received = "received" EQUAL (IPv4address / IPv6address) via-branch = "branch" EQUAL token via-extension = generic-param sent-protocol = protocol-name SLASH protocol-version SLASH transportNote, this method assumes that you have already stripped off the "Via" or "v". I.e., the header name. The return value is ALWAYS an array of objects of size 4. However, the port can be null (index 2 = the third value) so make sure to check it. Also, the 4th value (index 3) contains a List
consumeGenericParams(Buffer).
buffer - SipParseExceptionIOExceptionpublic static Buffer[] consumeSentBye(Buffer buffer) throws SipParseException, IOException
sent-by = host [ COLON port ] host = hostname / IPv4address / IPv6reference hostname = *( domainlabel "." ) toplabel [ "." ] domainlabel = alphanum toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT IPv6reference = "[" IPv6address "]" IPv6address = hexpart [ ":" IPv4address ] hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ] hexseq = hex4 *( ":" hex4) hex4 = 1*4HEXDIG port = 1*DIGITNow, since we want to do things as fast as possible and all the consumeXXX methods only do framing we will implement something a little simpler, faster but not 100% according to the BNF. So, consume everything until we either hit a ';' signifying parameters or a ':' which then forces us to start checking the port. Also, white space will stop parsing. However, a colon could also signify an IPv6 address, which is not handled right now.
buffer - IOExceptionSipParseExceptionpublic static Buffer consumePort(Buffer buffer) throws IOException
buffer - IOExceptionpublic static Buffer consumeHostname(Buffer buffer) throws IOException
IOExceptionpublic static Buffer consumeMType(Buffer buffer) throws SipParseException
m-type = discrete-type / composite-type discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token composite-type = "message" / "multipart" / extension-token extension-token = ietf-token / x-token ietf-token = token x-token = "x-" tokenAnd if you really read through all of that stuff it all boils down to "token" so that is all we end up doing in this method. Hence, this method is really only to put some context to consuming a media-type
IndexOutOfBoundsExceptionIOExceptionSipParseExceptionpublic static Buffer consumeMSubtype(Buffer buffer) throws SipParseException
m-subtype = extension-token / iana-token extension-token = ietf-token / x-token ietf-token = token x-token = "x-" token iana-token = tokenAnd if you really read through all of that stuff it all boils down to "token" so that is all we end up doing in this method. Hence, this method is really only to put some context to consuming a media-type
IndexOutOfBoundsExceptionIOExceptionSipParseExceptionpublic static int getTokenCount(Buffer buffer) throws IndexOutOfBoundsException, IOException
Buffer.buffer - IOExceptionIndexOutOfBoundsExceptionpublic static int getAlphaNumCount(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IndexOutOfBoundsExceptionIOExceptionpublic static boolean isNextAlphaNum(Buffer buffer) throws IndexOutOfBoundsException, IOException
buffer - IOExceptionIndexOutOfBoundsExceptionpublic static boolean isAlphaNum(char ch)
b - public static boolean isAlphaNum(byte b)
public static boolean isDigit(char ch)
public static boolean isDigit(byte b)
public static int consumeLWS(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static int consumeCRLF(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static void expect(Buffer buffer, byte expected) throws SipParseException, IOException
buffer - the buffer that we will check.expected - the buffer that contains the expected byte (note, it is 1
byte, not bytes)ParseException - in case the expected byte is not the next byte in the bufferSipParseExceptionIOExceptionpublic static int consumeWS(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static void expect(Buffer buffer, char ch) throws SipParseException
buffer - the buffer that we will check.expected - the expected charSipParseException - in case the expected char is not the next char in the buffer
or if there is an error reading from the underlying streampublic static List<SipHeader> nextHeaders(Buffer buffer) throws SipParseException
SipParseExceptionpublic static SipHeader nextHeader(Buffer buffer) throws SipParseException
buffer - SipParseExceptionpublic static SipMessage frame(Buffer buffer) throws IOException
SipMessage. No deep analysis of the message will be
performed by this framer so there is no guarantee that this SipMessage is actually a
well formed message.buffer - SipMessageIOExceptionpublic static boolean couldBeSipMessage(Buffer data) throws IOException
data - IOExceptionCopyright © 2017. All Rights Reserved.