public class SubstringFilter extends Filter
Constructor and Description |
---|
SubstringFilter()
The constructor.
|
SubstringFilter(int tlvId)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAnySubstrings(String any)
Add a internal substring
|
int |
computeLength()
Compute the SubstringFilter length
SubstringFilter : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the Substrings Filter to a PDU.
|
List<String> |
getAnySubstrings()
Get the internal substrings
|
String |
getFinalSubstrings()
Get the final substring
|
String |
getInitialSubstrings()
Get the initial substring
|
int |
getSubstringsLength() |
String |
getType()
Get the attribute
|
void |
setFinalSubstrings(String finalSubstrings)
Set the final substring
|
void |
setInitialSubstrings(String initialSubstrings)
Set the initial substring
|
void |
setSubstringsLength(int substringsLength) |
void |
setType(String type)
Set the attribute to match
|
String |
toString()
Return a string compliant with RFC 2254 representing a Substring filter
|
getParent, getParentTlvId, getTlvId, setParent
public SubstringFilter(int tlvId)
tlvId
- The TLV identifierpublic SubstringFilter()
public List<String> getAnySubstrings()
public void addAnySubstrings(String any)
any
- The anySubstrings to set.public String getFinalSubstrings()
public void setFinalSubstrings(String finalSubstrings)
finalSubstrings
- The finalSubstrings to set.public String getInitialSubstrings()
public void setInitialSubstrings(String initialSubstrings)
initialSubstrings
- The initialSubstrings to set.public void setType(String type)
type
- The type to set.public int getSubstringsLength()
public void setSubstringsLength(int substringsLength)
substringsLength
- The substringsLength to set.public int computeLength()
0xA4 L1 | +--> 0x04 L2 type +--> 0x30 L3 | [+--> 0x80 L4 initial] [+--> 0x81 L5-1 any] [+--> 0x81 L5-2 any] [+--> ... [+--> 0x81 L5-i any] [+--> ... [+--> 0x81 L5-n any] [+--> 0x82 L6 final]
computeLength
in class Filter
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
0xA4 LL 0x30 LL substringsFilter 0x04 LL type 0x30 LL substrings sequence | 0x80 LL initial | / [0x81 LL any]* |/ [0x82 LL final] +--[0x81 LL any]+ \ [0x82 LL final] \ 0x82 LL final
encode
in class Filter
buffer
- The buffer where to put the PDUEncoderException
- If the encoding failedCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.