com.sun.grizzly.util.buf
Class UDecoder

java.lang.Object
  extended by com.sun.grizzly.util.buf.UDecoder

public final class UDecoder
extends Object

All URL decoding happens here. This way we can reuse, review, optimize without adding complexity to the buffers. The conversion will modify the original buffer.

Author:
Costin Manolache

Field Summary
static boolean ALLOW_ENCODED_SLASH
           
 
Constructor Summary
UDecoder()
           
UDecoder(boolean allowEncodedSlash)
           
 
Method Summary
 void convert(ByteChunk mb)
          URLDecode, will modify the source.
 void convert(ByteChunk mb, boolean query)
          URLDecode the ByteChunk
 void convert(ByteChunk mb, boolean query, boolean allowEncodedSlash)
          URLDecode the ByteChunk
 void convert(CharChunk mb)
          In-buffer processing - the buffer will be modified Includes converting '+' to ' '.
 void convert(CharChunk mb, boolean query)
          In-buffer processing - the buffer will be modified
 void convert(MessageBytes mb)
          URLDecode, will modify the source Includes converting '+' to ' '.
 void convert(MessageBytes mb, boolean query)
          URLDecode, will modify the source
 void convert(MessageBytes mb, boolean query, boolean allowEncodingSlash)
          URLDecode, will modify the source
 String convert(String str)
           
 String convert(String str, boolean query)
           
 boolean isAllowEncodedSlash()
           
 void setAllowEncodedSlash(boolean allowEncodedSlash)
          Overide the default value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALLOW_ENCODED_SLASH

public static final boolean ALLOW_ENCODED_SLASH
Constructor Detail

UDecoder

public UDecoder()

UDecoder

public UDecoder(boolean allowEncodedSlash)
Method Detail

convert

public void convert(ByteChunk mb)
             throws IOException
URLDecode, will modify the source. Includes converting '+' to ' '.

Throws:
IOException

convert

public void convert(ByteChunk mb,
                    boolean query)
             throws IOException
URLDecode the ByteChunk

Throws:
IOException

convert

public void convert(ByteChunk mb,
                    boolean query,
                    boolean allowEncodedSlash)
             throws IOException
URLDecode the ByteChunk

Throws:
IOException

convert

public void convert(CharChunk mb)
             throws IOException
In-buffer processing - the buffer will be modified Includes converting '+' to ' '.

Throws:
IOException

convert

public void convert(CharChunk mb,
                    boolean query)
             throws IOException
In-buffer processing - the buffer will be modified

Throws:
IOException

convert

public void convert(MessageBytes mb)
             throws IOException
URLDecode, will modify the source Includes converting '+' to ' '.

Throws:
IOException

convert

public void convert(MessageBytes mb,
                    boolean query)
             throws IOException
URLDecode, will modify the source

Throws:
IOException

convert

public void convert(MessageBytes mb,
                    boolean query,
                    boolean allowEncodingSlash)
             throws IOException
URLDecode, will modify the source

Throws:
IOException

convert

public String convert(String str)

convert

public String convert(String str,
                      boolean query)

isAllowEncodedSlash

public boolean isAllowEncodedSlash()

setAllowEncodedSlash

public void setAllowEncodedSlash(boolean allowEncodedSlash)
Overide the default value

Parameters:
allowEncodedSlash -


Copyright © 2013 Oracle Corporation. All Rights Reserved.