91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

Sun公司提供的Base64轉碼/解碼工具,包含jar包和源代碼。

資源截圖

代碼片段和文件信息

/*
?*?Java?base64?-?A?pure?Java?library?for?reading?and?writing?base64
?*???????????????encoded?streams.
?*?
?*?Copyright?(C)?2007-2009?Carlo?Pelliccia?(www.sauronsoftware.it)
?*?
?*?This?program?is?free?software:?you?can?redistribute?it?and/or?modify
?*?it?under?the?terms?of?the?GNU?Lesser?General?Public?License?version
?*?2.1?as?published?by?the?Free?Software?Foundation.
?*
?*?This?program?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*?GNU?General?Public?License?for?more?details.
?*
?*?You?should?have?received?a?copy?of?the?GNU?Lesser?General?Public
?*?License?version?2.1?along?with?this?program.
?*?If?not?see?.
?*/
package?it.sauronsoftware.base64;

import?java.io.ByteArrayInputStream;
import?java.io.ByteArrayOutputStream;
import?java.io.File;
import?java.io.FileInputStream;
import?java.io.FileOutputStream;
import?java.io.IOException;
import?java.io.InputStream;
import?java.io.OutputStream;
import?java.io.UnsupportedEncodingException;

/**
?*?


?*?base64?encoding?and?decoding?utility?methods?both?for?binary?and?textual
?*?informations.
?*?


?*?
?*?@author?Carlo?Pelliccia
?*?@since?1.1
?*?@version?1.3
?*/
public?class?base64?{

/**
?*?


?*?Encodes?a?string.
?*?


?*?


?*?Before?the?string?is?encoded?in?base64?it?is?converted?in?a?binary
?*?sequence?using?the?system?default?charset.
?*?


?*?
?*?@param?str
?*????????????The?source?string.
?*?@return?The?encoded?string.
?*?@throws?RuntimeException
?*?????????????If?an?unexpected?error?occurs.
?*/
public?static?String?encode(String?str)?throws?RuntimeException?{
byte[]?bytes?=?str.getBytes();
byte[]?encoded?=?encode(bytes);
try?{
return?new?String(encoded?“ASCII“);
}?catch?(UnsupportedEncodingException?e)?{
throw?new?RuntimeException(“ASCII?is?not?supported!“?e);
}
}

/**
?*?


?*?Encodes?a?string.
?*?


?*?


?*?Before?the?string?is?encoded?in?base64?it?is?converted?in?a?binary
?*?sequence?using?the?supplied?charset.
?*?


?*?
?*?@param?str
?*????????????The?source?string
?*?@param?charset
?*????????????The?charset?name.
?*?@return?The?encoded?string.
?*?@throws?RuntimeException
?*?????????????If?an?unexpected?error?occurs.
?*?@since?1.2
?*/
public?static?String?encode(String?str?String?charset)
throws?RuntimeException?{
byte[]?bytes;
try?{
bytes?=?str.getBytes(charset);
}?catch?(UnsupportedEncodingException?e)?{
throw?new?RuntimeException(“Unsupported?charset:?“?+?charset?e);
}
byte[]?encoded?=?encode(bytes);
try?{
return?new?String(encoded?“ASCII“);
}?catch?(UnsupportedEncodingException?e)?{
throw?new?RuntimeException(“ASCII?is?not?supported!“?e);
}
}

/**
?*?


?*?Decodes?the?supplied?string.
?*?


?*?


?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\sauronsoftware\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\sauronsoftware\base64\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\resources\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\src-html\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\src-html\it\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\src-html\it\sauronsoftware\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\doc\api\src-html\it\sauronsoftware\base64\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\src\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\src\it\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\src\it\sauronsoftware\
?????目錄???????????0??2009-05-02?17:19??javabase64-1.3.1\src\it\sauronsoftware\base64\
?????文件?????????492??2009-05-02?17:19??javabase64-1.3.1\BUILD.txt
?????文件?????????352??2009-05-02?17:19??javabase64-1.3.1\CHANGELOG.txt
?????文件???????26436??2009-05-02?17:19??javabase64-1.3.1\LICENSE.txt
?????文件?????????501??2009-05-02?17:19??javabase64-1.3.1\README.txt
?????文件?????????341??2009-05-02?17:19??javabase64-1.3.1\build.properties
?????文件????????2854??2009-05-02?17:19??javabase64-1.3.1\build.xml
?????文件????????1056??2009-05-02?17:19??javabase64-1.3.1\doc\api\allclasses-frame.html
?????文件?????????996??2009-05-02?17:19??javabase64-1.3.1\doc\api\allclasses-noframe.html
?????文件????????4983??2009-05-02?17:19??javabase64-1.3.1\doc\api\constant-values.html
?????文件????????4919??2009-05-02?17:19??javabase64-1.3.1\doc\api\deprecated-list.html
?????文件????????8806??2009-05-02?17:19??javabase64-1.3.1\doc\api\help-doc.html
?????文件???????14069??2009-05-02?17:19??javabase64-1.3.1\doc\api\index-all.html
?????文件????????1348??2009-05-02?17:19??javabase64-1.3.1\doc\api\index.html
?????文件???????27391??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\sauronsoftware\base64\base64.html
?????文件???????12076??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\sauronsoftware\base64\base64InputStream.html
?????文件???????14162??2009-05-02?17:19??javabase64-1.3.1\doc\api\it\sauronsoftware\base64\base64OutputStream.html
............此處省略18個文件信息

評論

共有 條評論