Example usage for com.google.common.net PercentEscaper PercentEscaper

List of usage examples for com.google.common.net PercentEscaper PercentEscaper

Introduction

In this page you can find the example usage for com.google.common.net PercentEscaper PercentEscaper.

Prototype

public PercentEscaper(String safeChars, boolean plusForSpace) 

Source Link

Document

Constructs a percent escaper with the specified safe characters and optional handling of the space character.

Usage

From source file:com.github.fge.uritemplate.render.ValueRenderer.java

/**
 * Constructor// w ww . j av a2  s  . c  o  m
 *
 * @param type the expression type
 */
protected ValueRenderer(final ExpressionType type) {
    named = type.isNamed();
    ifEmpty = type.getIfEmpty();
    final String escaped = type.isRawExpand() ? EscapeCharsets.RESERVED_PLUS_UNRESERVED
            : EscapeCharsets.UNRESERVED;
    escaper = new PercentEscaper(escaped, false);
}

From source file:org.n52.svalbard.odata.ODataFesParser.java

/**
 * Creates a new {@code ODataFesParser}.
 *///  w w  w .  j  a  va2s . c  o  m
public ODataFesParser() {
    this.urlEscaper = new PercentEscaper("-_.*", false);
    this.odata = new ODataImpl();
    this.csdlProvider = new ObservationCsdlEdmProvider();
    this.edm = new EdmProviderImpl(this.csdlProvider);
    // >=4.2.0
    // this.parser = new Parser(this.edm, this.odata);
    // >=4.0.0 <4.2.0
    this.parser = new Parser();

}