Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package io.pkts.packet.sip.address;
import static io.pkts.packet.sip.impl.PreConditions.assertNotEmpty;
import static io.pkts.packet.sip.impl.PreConditions.assertNotNull;
import java.io.IOException;
import io.pkts.buffer.Buffer;
import io.pkts.buffer.Buffers;
import io.pkts.packet.sip.SipParseException;
import io.pkts.packet.sip.address.impl.TelURIImpl;
import io.pkts.packet.sip.header.impl.ParametersSupport;
import io.pkts.packet.sip.impl.PreConditions;
import io.pkts.packet.sip.impl.SipParser;
import io.pkts.packet.sip.impl.TelUriParser;
/**
*
* @author dmnava
*
*/
public interface TelURI extends URI {
/**
* Specifies whether the telephone number is global or not
*
* @return
*/
boolean isGlobal();
/**
* Returns the phone number, without the '+' in case of global number
*
* @return
*/
Buffer getPhoneNumber();
@Override
default boolean isTelURI() {
return true;
}
@Override
default TelURI toTelURI() {
return this;
}
/**
* Get the value of the named parameter. If the named parameter is a
* so-called flag parameter, then the value returned will be an empty
* {@link Buffer}, which can be checked with {@link Buffer#isEmpty()} or
* {@link Buffer#capacity()}, which will return zero. As with any empty
* {@link Buffer}, if you do {@link Buffer#toString()} you will be getting
* an empty {@link String} back, which would be yet another way to check for
* a flag parameter.
*
* @param name
* the name of the parameter we are looking for.
* @return the value of the named parameter or null if there is no such
* parameter. If the named parameter is a flag parameter, then an
* empty buffer will be returned.
* @throws SipParseException
* in case anything goes wrong while extracting the parameter.
* @throws IllegalArgumentException
* in case the name is null.
*/
Buffer getParameter(Buffer name) throws SipParseException, IllegalArgumentException;
/**
* Same as {@link #getParameter(Buffer)}.
*
* @param name
* @return
* @throws SipParseException
* in case anything goes wrong while extracting the parameter.
* @throws IllegalArgumentException
* in case the name is null.
*/
Buffer getParameter(String name) throws SipParseException, IllegalArgumentException;
/**
* Frame a TEL Uri, which according to RFC 3966 has the following syntax:
*
*