Example usage for org.apache.http.util CharArrayBuffer substringTrimmed

List of usage examples for org.apache.http.util CharArrayBuffer substringTrimmed

Introduction

In this page you can find the example usage for org.apache.http.util CharArrayBuffer substringTrimmed.

Prototype

public String substringTrimmed(int i, int i2) 

Source Link

Usage

From source file:org.apache.http.impl.auth.win.WindowsNegotiateScheme.java

@Override
protected void parseChallenge(final CharArrayBuffer buffer, final int beginIndex, final int endIndex)
        throws MalformedChallengeException {
    this.challenge = buffer.substringTrimmed(beginIndex, endIndex);

    if (this.challenge.length() == 0) {
        if (clientCred != null) {
            if (continueNeeded) {
                throw new RuntimeException("Unexpected token");
            }/*from  w w  w.  j  a va  2  s. co m*/
            dispose();
        }
    }
}