C# 클래스 Ushahidi.Common.Net.HttpUtility

Provides methods for encoding and decoding URLs when processing Web requests. This class cannot be inherited.
파일 보기 프로젝트 열기: ushahidi/Ushahidi_WinMobile

공개 메소드들

메소드 설명
HtmlDecode ( string s ) : string

Minimally converts a string to an HTML-encoded string.

Minimally converts a string into an HTML-encoded string and sends the encoded string to a output stream.

Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.

HtmlDecode ( string s, TextWriter output ) : void

Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a output stream.

UrlDecode ( byte bytes, Encoding e ) : string

Converts a URL-encoded byte array into a decoded string using the specified decoding object.

UrlDecode ( byte bytes, int offset, int count, Encoding e ) : string

Converts a URL-encoded byte array into a decoded string using the specified encoding object, starting at the specified position in the array, and continuing for the specified number of bytes.

UrlDecode ( string str ) : string

Parses a query string into a using encoding.

Parses a query string into a using the specified .

Converts a string that has been encoded for transmission in a URL into a decoded string.

UrlDecode ( string str, Encoding e ) : string

Converts a URL-encoded string into a decoded string, using the specified encoding object.

UrlDecodeToBytes ( byte bytes ) : byte[]

Converts a URL-encoded array of bytes into a decoded array of bytes.

UrlDecodeToBytes ( byte bytes, int offset, int count ) : byte[]

Converts a URL-encoded array of bytes into a decoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.

UrlDecodeToBytes ( string str ) : byte[]

Converts a URL-encoded string into a decoded array of bytes.

UrlDecodeToBytes ( string str, Encoding e ) : byte[]

Converts a URL-encoded string into a decoded array of bytes using the specified decoding object.

UrlEncode ( byte bytes ) : string

Converts a byte array into an encoded URL string.

UrlEncode ( byte bytes, int offset, int count ) : string

Converts a byte array into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes.

UrlEncode ( string str ) : string

Encodes a URL string.

UrlEncode ( string str, Encoding e ) : string

Encodes a URL string using the specified encoding object.

UrlEncodeToBytes ( byte bytes ) : byte[]

Converts an array of bytes into a URL-encoded array of bytes.

UrlEncodeToBytes ( byte bytes, int offset, int count ) : byte[]

Converts an array of bytes into a URL-encoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.

UrlEncodeToBytes ( string str ) : byte[]

Converts a string into a URL-encoded array of bytes.

UrlEncodeToBytes ( string str, Encoding e ) : byte[]

Converts a string into a URL-encoded array of bytes using the specified encoding object.

UrlEncodeUnicode ( string str ) : string

Converts a string into a Unicode string.

UrlEncodeUnicodeToBytes ( string str ) : byte[]

Converts a Unicode string into an array of bytes.

UrlPathEncode ( string str ) : string

Encodes the path portion of a URL string for reliable HTTP transmission from the Web server to a client.

비공개 메소드들

메소드 설명
ASCIIGetString ( byte bytes ) : string

Decodes all the bytes in the specified byte array into a string.

Replace the method "System.Text.Encoding.ASCII.GetString(byte[] bytes);" in .Net Framework.

HexToInt ( char h ) : int
IntToHex ( int n ) : char

Converts a string to an HTML-encoded string.

Converts a string into an HTML-encoded string, and returns the output as a stream of output.

IsNonAsciiByte ( byte b ) : bool
IsSafe ( char ch ) : bool
UrlDecodeBytesFromBytesInternal ( byte buf, int offset, int count ) : byte[]
UrlDecodeStringFromBytesInternal ( byte buf, int offset, int count, Encoding e ) : string
UrlDecodeStringFromStringInternal ( string s, Encoding e ) : string
UrlEncodeBytesToBytesInternal ( byte bytes, int offset, int count, bool alwaysCreateReturnValue ) : byte[]
UrlEncodeBytesToBytesInternalNonAscii ( byte bytes, int offset, int count, bool alwaysCreateReturnValue ) : byte[]
UrlEncodeNonAscii ( string str, Encoding e ) : string
UrlEncodeSpaces ( string str ) : string
UrlEncodeUnicodeStringToStringInternal ( string s, bool ignoreAscii ) : string

메소드 상세

HtmlDecode() 공개 정적인 메소드

Minimally converts a string to an HTML-encoded string. Minimally converts a string into an HTML-encoded string and sends the encoded string to a output stream. Converts a string that has been HTML-encoded for HTTP transmission into a decoded string.
public static HtmlDecode ( string s ) : string
s string The string to encode.
리턴 string

HtmlDecode() 공개 정적인 메소드

Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a output stream.
public static HtmlDecode ( string s, TextWriter output ) : void
s string The string to decode.
output System.IO.TextWriter A stream of output.
리턴 void

UrlDecode() 공개 정적인 메소드

Converts a URL-encoded byte array into a decoded string using the specified decoding object.
public static UrlDecode ( byte bytes, Encoding e ) : string
bytes byte The array of bytes to decode.
e System.Text.Encoding The that specifies the decoding scheme.
리턴 string

UrlDecode() 공개 정적인 메소드

Converts a URL-encoded byte array into a decoded string using the specified encoding object, starting at the specified position in the array, and continuing for the specified number of bytes.
public static UrlDecode ( byte bytes, int offset, int count, Encoding e ) : string
bytes byte The array of bytes to decode.
offset int The position in the byte to begin decoding.
count int The number of bytes to decode.
e System.Text.Encoding The object that specifies the decoding scheme.
리턴 string

UrlDecode() 공개 정적인 메소드

Parses a query string into a using encoding. Parses a query string into a using the specified . Converts a string that has been encoded for transmission in a URL into a decoded string.
query is null. query is null.- or -encoding is null.
public static UrlDecode ( string str ) : string
str string The string to decode.
리턴 string

UrlDecode() 공개 정적인 메소드

Converts a URL-encoded string into a decoded string, using the specified encoding object.
public static UrlDecode ( string str, Encoding e ) : string
str string The string to decode.
e System.Text.Encoding The that specifies the decoding scheme.
리턴 string

UrlDecodeToBytes() 공개 정적인 메소드

Converts a URL-encoded array of bytes into a decoded array of bytes.
public static UrlDecodeToBytes ( byte bytes ) : byte[]
bytes byte The array of bytes to decode.
리턴 byte[]

UrlDecodeToBytes() 공개 정적인 메소드

Converts a URL-encoded array of bytes into a decoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.
public static UrlDecodeToBytes ( byte bytes, int offset, int count ) : byte[]
bytes byte The array of bytes to decode.
offset int The position in the byte array at which to begin decoding.
count int The number of bytes to decode.
리턴 byte[]

UrlDecodeToBytes() 공개 정적인 메소드

Converts a URL-encoded string into a decoded array of bytes.
public static UrlDecodeToBytes ( string str ) : byte[]
str string The string to decode.
리턴 byte[]

UrlDecodeToBytes() 공개 정적인 메소드

Converts a URL-encoded string into a decoded array of bytes using the specified decoding object.
public static UrlDecodeToBytes ( string str, Encoding e ) : byte[]
str string The string to decode.
e System.Text.Encoding The object that specifies the decoding scheme.
리턴 byte[]

UrlEncode() 공개 정적인 메소드

Converts a byte array into an encoded URL string.
public static UrlEncode ( byte bytes ) : string
bytes byte The array of bytes to encode.
리턴 string

UrlEncode() 공개 정적인 메소드

Converts a byte array into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes.
public static UrlEncode ( byte bytes, int offset, int count ) : string
bytes byte The array of bytes to encode.
offset int The position in the byte array at which to begin encoding.
count int The number of bytes to encode.
리턴 string

UrlEncode() 공개 정적인 메소드

Encodes a URL string.
public static UrlEncode ( string str ) : string
str string The text to encode.
리턴 string

UrlEncode() 공개 정적인 메소드

Encodes a URL string using the specified encoding object.
public static UrlEncode ( string str, Encoding e ) : string
str string The text to encode.
e System.Text.Encoding The object that specifies the encoding scheme.
리턴 string

UrlEncodeToBytes() 공개 정적인 메소드

Converts an array of bytes into a URL-encoded array of bytes.
public static UrlEncodeToBytes ( byte bytes ) : byte[]
bytes byte The array of bytes to encode.
리턴 byte[]

UrlEncodeToBytes() 공개 정적인 메소드

Converts an array of bytes into a URL-encoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes.
public static UrlEncodeToBytes ( byte bytes, int offset, int count ) : byte[]
bytes byte The array of bytes to encode.
offset int The position in the byte array at which to begin encoding.
count int The number of bytes to encode.
리턴 byte[]

UrlEncodeToBytes() 공개 정적인 메소드

Converts a string into a URL-encoded array of bytes.
public static UrlEncodeToBytes ( string str ) : byte[]
str string The string to encode.
리턴 byte[]

UrlEncodeToBytes() 공개 정적인 메소드

Converts a string into a URL-encoded array of bytes using the specified encoding object.
public static UrlEncodeToBytes ( string str, Encoding e ) : byte[]
str string The string to encode
e System.Text.Encoding The that specifies the encoding scheme.
리턴 byte[]

UrlEncodeUnicode() 공개 정적인 메소드

Converts a string into a Unicode string.
public static UrlEncodeUnicode ( string str ) : string
str string The string to convert.
리턴 string

UrlEncodeUnicodeToBytes() 공개 정적인 메소드

Converts a Unicode string into an array of bytes.
public static UrlEncodeUnicodeToBytes ( string str ) : byte[]
str string The string to convert.
리턴 byte[]

UrlPathEncode() 공개 정적인 메소드

Encodes the path portion of a URL string for reliable HTTP transmission from the Web server to a client.
public static UrlPathEncode ( string str ) : string
str string The text to URL-encode.
리턴 string