⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 urlcodec.html

📁 JSP建站必须文件commons-codec-1.3.zip
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(byte[])">encode</A></B>(byte[]&nbsp;bytes)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes an array of bytes into an array of URL safe 7-bit  characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.Object)">encode</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;pObject)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes an object into its URL safe form.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;pString)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a string into its URL safe form using the default string  charset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encode(java.lang.String, java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;pString,       <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;charset)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes a string into its URL safe form using the specified string charset.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#encodeUrl(java.util.BitSet, byte[])">encodeUrl</A></B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/util/BitSet.html" title="class or interface in java.util">BitSet</A>&nbsp;urlsafe,          byte[]&nbsp;bytes)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes an array of bytes into an array of URL safe 7-bit  characters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getDefaultCharset()">getDefaultCharset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default charset used for string decoding and encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/net/URLCodec.html#getEncoding()">getEncoding</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use #getDefaultCharset()</I></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="charset"><!-- --></A><H3>
charset</H3>
<PRE>
protected <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>charset</B></PRE>
<DL>
<DD>The default charset used for string decoding and encoding.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="ESCAPE_CHAR"><!-- --></A><H3>
ESCAPE_CHAR</H3>
<PRE>
protected static byte <B>ESCAPE_CHAR</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="WWW_FORM_URL"><!-- --></A><H3>
WWW_FORM_URL</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/util/BitSet.html" title="class or interface in java.util">BitSet</A> <B>WWW_FORM_URL</B></PRE>
<DL>
<DD>BitSet of www-form-url safe characters.
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="URLCodec()"><!-- --></A><H3>
URLCodec</H3>
<PRE>
public <B>URLCodec</B>()</PRE>
<DL>
<DD>Default constructor.
<P>
</DL>
<HR>

<A NAME="URLCodec(java.lang.String)"><!-- --></A><H3>
URLCodec</H3>
<PRE>
public <B>URLCodec</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;charset)</PRE>
<DL>
<DD>Constructor which allows for the selection of a default charset
<P>
<DT><B>Parameters:</B><DD><CODE>charset</CODE> - the default string charset to use.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="encodeUrl(java.util.BitSet, byte[])"><!-- --></A><H3>
encodeUrl</H3>
<PRE>
public static final byte[] <B>encodeUrl</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/util/BitSet.html" title="class or interface in java.util">BitSet</A>&nbsp;urlsafe,                                     byte[]&nbsp;bytes)</PRE>
<DL>
<DD>Encodes an array of bytes into an array of URL safe 7-bit  characters. Unsafe characters are escaped.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>urlsafe</CODE> - bitset of characters deemed URL safe<DD><CODE>bytes</CODE> - array of bytes to convert to URL safe characters<DT><B>Returns:</B><DD>array of bytes containing URL safe characters</DL>
</DD>
</DL>
<HR>

<A NAME="decodeUrl(byte[])"><!-- --></A><H3>
decodeUrl</H3>
<PRE>
public static final byte[] <B>decodeUrl</B>(byte[]&nbsp;bytes)                              throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
<DL>
<DD>Decodes an array of URL safe 7-bit characters into an array of  original bytes. Escaped characters are converted back to their  original representation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of URL safe characters<DT><B>Returns:</B><DD>array of original bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful</DL>
</DD>
</DL>
<HR>

<A NAME="encode(byte[])"><!-- --></A><H3>
encode</H3>
<PRE>
public byte[] <B>encode</B>(byte[]&nbsp;bytes)</PRE>
<DL>
<DD>Encodes an array of bytes into an array of URL safe 7-bit  characters. Unsafe characters are escaped.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html#encode(byte[])">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryEncoder.html" title="interface in org.apache.commons.codec">BinaryEncoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of bytes to convert to URL safe characters<DT><B>Returns:</B><DD>array of bytes containing URL safe characters</DL>
</DD>
</DL>
<HR>

<A NAME="decode(byte[])"><!-- --></A><H3>
decode</H3>
<PRE>
public byte[] <B>decode</B>(byte[]&nbsp;bytes)              throws <A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></PRE>
<DL>
<DD>Decodes an array of URL safe 7-bit characters into an array of  original bytes. Escaped characters are converted back to their  original representation.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html#decode(byte[])">decode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/BinaryDecoder.html" title="interface in org.apache.commons.codec">BinaryDecoder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - array of URL safe characters<DT><B>Returns:</B><DD>array of original bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/DecoderException.html" title="class in org.apache.commons.codec">DecoderException</A></CODE> - Thrown if URL decoding is unsuccessful</DL>
</DD>
</DL>
<HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -