com.googlecode.jinahya.rfc3986
Class PercentEncoder

java.lang.Object
  extended by com.googlecode.jinahya.rfc3986.PercentEncoder

public class PercentEncoder
extends Object

Percent Encoder.

Author:
Jin Kwon
See Also:
Percent Encoding

Constructor Summary
protected PercentEncoder()
          Creates a new instance.
 
Method Summary
static byte[] encode(byte... input)
          Encodes given input.
static void encode(InputStream input, OutputStream output)
          Encodes bytes from input and writes those encoded characters to output.
static void encode(InputStream input, Writer output)
          Encodes bytes from input and writes those encoded characters to output.
static byte[] encode(String input)
          Encodes given input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PercentEncoder

protected PercentEncoder()
Creates a new instance.

Method Detail

encode

public static byte[] encode(String input)
                     throws IOException
Encodes given input.

Parameters:
input - string to encode
Returns:
encoding output
Throws:
IOException - if an I/O error occurs.

encode

public static byte[] encode(byte... input)
                     throws IOException
Encodes given input.

Parameters:
input - bytes to encode
Returns:
encoding output
Throws:
IOException - if an I/O error occurs

encode

public static void encode(InputStream input,
                          OutputStream output)
                   throws IOException
Encodes bytes from input and writes those encoded characters to output.

Parameters:
input - input
output - output
Throws:
IOException - if an I/O error occurs.

encode

public static void encode(InputStream input,
                          Writer output)
                   throws IOException
Encodes bytes from input and writes those encoded characters to output.

Parameters:
input - byte input
output - character output
Throws:
IOException - if an I/O error occurs


Copyright © 2011. All Rights Reserved.