亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? base64.java

?? Encodes and decodes to and from Base64 notation
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
import java.io.IOException;import java.nio.ByteBuffer;import java.nio.CharBuffer;/** * <p>Encodes and decodes to and from Base64 notation.</p> * <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p> *  * <p>Example:</p> *  * <code>String encoded = Base64.encode( myByteArray );</code> *  * <code>byte[] myByteArray = Base64.decode( encoded );</code> * * <p>The <tt>options</tt> parameter, which appears in a few places, is used to pass  * several pieces of information to the encoder. In the "higher level" methods such as  * encodeBytes( bytes, options ) the options parameter can be used to indicate such  * things as first gzipping the bytes before encoding them, not inserting linefeeds, * and encoding using the URL-safe and Ordered dialects.</p> * * <p>Note, according to <a href="http://www.faqs.org/rfcs/rfc3548.html">RFC3548</a>, * Section 2.1, implementations should not add line feeds unless explicitly told * to do so. I've got Base64 set the opposite way so that you tell it _not_ to * add line feeds since I always thought line feeds were required -- I was wrong, * but I'm reluctant to change the default behavior now. Sorry.</p> * * <p>The constants defined in Base64 can be OR-ed together to combine options, so you  * might make a call like this:</p> * * <code>String encoded = Base64.encodeBytes( mybytes, Base64.GZIP | Base64.DONT_BREAK_LINES );</code> * * <p>to compress the data before encoding it and then making the output have no newline characters.</p> * * * <p> * Change Log: * </p> * <ul> *  <li>v2.3.1 - Added {@link #encodeBytesToBytes(byte[], int, int, int)} and some *   similar helper methods to be more efficient with memory by not returning a *   String but just a byte array.</li> *  <li>v2.3 - <strong>This is not a drop-in replacement!</strong> This is two years of comments *   and bug fixes queued up and finally executed. Thanks to everyone who sent *   me stuff, and I'm sorry I wasn't able to distribute your fixes to everyone else. *   Much bad coding was cleaned up including throwing exceptions where necessary  *   instead of returning null values or something similar. Here are some changes *   that may affect you: *   <ul> *    <li><em>Does not break lines, by default.</em> This is to keep in compliance with *      <a href="http://www.faqs.org/rfcs/rfc3548.html">RFC3548</a>.</li> *    <li><em>Throws exceptions instead of returning null values.</em> Because some operations *      (especially those that may permit the GZIP option) use IO streams, there *      is a possiblity of an java.io.IOException being thrown. After some discussion and *      thought, I've changed the behavior of the methods to throw java.io.IOExceptions *      rather than return null if ever there's an error. I think this is more *      appropriate, though it will require some changes to your code. Sorry, *      it should have been done this way to begin with.</li> *    <li><em>Removed all references to System.out, System.err, and the like.</em> *      Shame on me. All I can say is sorry they were ever there.</li> *    <li><em>Throws NullPointerExceptions and IllegalArgumentExceptions</em> as needed *      such as when passed arrays are null or offsets are invalid.</li> *    <li>Cleaned up as much javadoc as I could to avoid any javadoc warnings. *      This was especially annoying before for people who were thorough in their *      own projects and then had gobs of javadoc warnings on this file.</li> *   </ul> *  <li>v2.2.1 - Fixed bug using URL_SAFE and ORDERED encodings. Fixed bug *   when using very small files (~< 40 bytes).</li> *  <li>v2.2 - Added some helper methods for encoding/decoding directly from *   one file to the next. Also added a main() method to support command line *   encoding/decoding from one file to the next. Also added these Base64 dialects: *   <ol> *   <li>The default is RFC3548 format.</li> *   <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.URLSAFE_FORMAT) generates *   URL and file name friendly format as described in Section 4 of RFC3548. *   http://www.faqs.org/rfcs/rfc3548.html</li> *   <li>Calling Base64.setFormat(Base64.BASE64_FORMAT.ORDERED_FORMAT) generates *   URL and file name friendly format that preserves lexical ordering as described *   in http://www.faqs.org/qa/rfcc-1940.html</li> *   </ol> *   Special thanks to Jim Kellerman at <a href="http://www.powerset.com/">http://www.powerset.com/</a> *   for contributing the new Base64 dialects. *  </li> *  *  <li>v2.1 - Cleaned up javadoc comments and unused variables and methods. Added *   some convenience methods for reading and writing to and from files.</li> *  <li>v2.0.2 - Now specifies UTF-8 encoding in places where the code fails on systems *   with other encodings (like EBCDIC).</li> *  <li>v2.0.1 - Fixed an error when decoding a single byte, that is, when the *   encoded data was a single byte.</li> *  <li>v2.0 - I got rid of methods that used booleans to set options.  *   Now everything is more consolidated and cleaner. The code now detects *   when data that's being decoded is gzip-compressed and will decompress it *   automatically. Generally things are cleaner. You'll probably have to *   change some method calls that you were making to support the new *   options format (<tt>int</tt>s that you "OR" together).</li> *  <li>v1.5.1 - Fixed bug when decompressing and decoding to a              *   byte[] using <tt>decode( String s, boolean gzipCompressed )</tt>.       *   Added the ability to "suspend" encoding in the Output Stream so         *   you can turn on and off the encoding if you need to embed base64        *   data in an otherwise "normal" stream (like an XML file).</li>   *  <li>v1.5 - Output stream pases on flush() command but doesn't do anything itself. *      This helps when using GZIP streams. *      Added the ability to GZip-compress objects before encoding them.</li> *  <li>v1.4 - Added helper methods to read/write files.</li> *  <li>v1.3.6 - Fixed OutputStream.flush() so that 'position' is reset.</li> *  <li>v1.3.5 - Added flag to turn on and off line breaks. Fixed bug in input stream *      where last buffer being read, if not completely full, was not returned.</li> *  <li>v1.3.4 - Fixed when "improperly padded stream" error was thrown at the wrong time.</li> *  <li>v1.3.3 - Fixed I/O streams which were totally messed up.</li> * </ul> * * <p> * I am placing this code in the Public Domain. Do with it as you will. * This software comes with no guarantees or warranties but with * plenty of well-wishing instead! * Please visit <a href="http://iharder.net/base64">http://iharder.net/base64</a> * periodically to check for updates or to contribute improvements. * </p> * * @author Robert Harder * @author rob@iharder.net * @version 2.3.1 */public class Base64{    /* ********  P U B L I C   F I E L D S  ******** */               /** No options specified. Value is zero. */    public final static int NO_OPTIONS = 0;        /** Specify encoding in first bit. Value is one. */    public final static int ENCODE = 1;            /** Specify decoding in first bit. Value is zero. */    public final static int DECODE = 0;            /** Specify that data should be gzip-compressed in second bit. Value is two. */    public final static int GZIP = 2;            /** Do break lines when encoding. Value is 8. */    public final static int DO_BREAK_LINES = 8;	    /**      * Encode using Base64-like encoding that is URL- and Filename-safe as described     * in Section 4 of RFC3548:      * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.     * It is important to note that data encoded this way is <em>not</em> officially valid Base64,      * or at the very least should not be called Base64 without also specifying that is     * was encoded using the URL- and Filename-safe dialect.     */     public final static int URL_SAFE = 16;     /**      * Encode using the special "ordered" dialect of Base64 described here:      * <a href="http://www.faqs.org/qa/rfcc-1940.html">http://www.faqs.org/qa/rfcc-1940.html</a>.      */     public final static int ORDERED = 32;        /* ********  P R I V A T E   F I E L D S  ******** */              /** Maximum line length (76) of Base64 output. */    private final static int MAX_LINE_LENGTH = 76;            /** The equals sign (=) as a byte. */    private final static byte EQUALS_SIGN = (byte)'=';            /** The new line character (\n) as a byte. */    private final static byte NEW_LINE = (byte)'\n';            /** Preferred encoding. */    private final static String PREFERRED_ENCODING = "UTF-8";    	    private final static byte WHITE_SPACE_ENC = -5; // Indicates white space in encoding    private final static byte EQUALS_SIGN_ENC = -1; // Indicates equals sign in encoding		/* ********  S T A N D A R D   B A S E 6 4   A L P H A B E T  ******** */	        /** The 64 valid Base64 values. */    /* Host platform me be something funny like EBCDIC, so we hardcode these values. */    private final static byte[] _STANDARD_ALPHABET = {        (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',        (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',        (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U',         (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',        (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',        (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',        (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u',         (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',        (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',         (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'    };	        /**      * Translates a Base64 value to either its 6-bit reconstruction value     * or a negative number indicating some other meaning.     **/    private final static byte[] _STANDARD_DECODABET = {        -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8        -5,-5,                                      // Whitespace: Tab and Linefeed        -9,-9,                                      // Decimal 11 - 12        -5,                                         // Whitespace: Carriage Return        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26        -9,-9,-9,-9,-9,                             // Decimal 27 - 31        -5,                                         // Whitespace: Space        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42        62,                                         // Plus sign at decimal 43        -9,-9,-9,                                   // Decimal 44 - 46        63,                                         // Slash at decimal 47        52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine        -9,-9,-9,                                   // Decimal 58 - 60        -1,                                         // Equals sign at decimal 61        -9,-9,-9,                                      // Decimal 62 - 64        0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'        14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'        -9,-9,-9,-9,-9,-9,                          // Decimal 91 - 96        26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'        39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'        -9,-9,-9,-9                                 // Decimal 123 - 126        /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243        -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9         // Decimal 244 - 255 */    };		/* ********  U R L   S A F E   B A S E 6 4   A L P H A B E T  ******** */	    /**     * Used in the URL- and Filename-safe dialect described in Section 4 of RFC3548:      * <a href="http://www.faqs.org/rfcs/rfc3548.html">http://www.faqs.org/rfcs/rfc3548.html</a>.     * Notice that the last two bytes become "hyphen" and "underscore" instead of "plus" and "slash."     */    private final static byte[] _URL_SAFE_ALPHABET = {      (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F', (byte)'G',      (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L', (byte)'M', (byte)'N',      (byte)'O', (byte)'P', (byte)'Q', (byte)'R', (byte)'S', (byte)'T', (byte)'U',       (byte)'V', (byte)'W', (byte)'X', (byte)'Y', (byte)'Z',      (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f', (byte)'g',      (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l', (byte)'m', (byte)'n',      (byte)'o', (byte)'p', (byte)'q', (byte)'r', (byte)'s', (byte)'t', (byte)'u',       (byte)'v', (byte)'w', (byte)'x', (byte)'y', (byte)'z',      (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',       (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'-', (byte)'_'    };	    /**     * Used in decoding URL- and Filename-safe dialects of Base64.     */    private final static byte[] _URL_SAFE_DECODABET = {      -9,-9,-9,-9,-9,-9,-9,-9,-9,                 // Decimal  0 -  8      -5,-5,                                      // Whitespace: Tab and Linefeed      -9,-9,                                      // Decimal 11 - 12      -5,                                         // Whitespace: Carriage Return      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 14 - 26      -9,-9,-9,-9,-9,                             // Decimal 27 - 31      -5,                                         // Whitespace: Space      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,              // Decimal 33 - 42      -9,                                         // Plus sign at decimal 43      -9,                                         // Decimal 44      62,                                         // Minus sign at decimal 45      -9,                                         // Decimal 46      -9,                                         // Slash at decimal 47      52,53,54,55,56,57,58,59,60,61,              // Numbers zero through nine      -9,-9,-9,                                   // Decimal 58 - 60      -1,                                         // Equals sign at decimal 61      -9,-9,-9,                                   // Decimal 62 - 64      0,1,2,3,4,5,6,7,8,9,10,11,12,13,            // Letters 'A' through 'N'      14,15,16,17,18,19,20,21,22,23,24,25,        // Letters 'O' through 'Z'      -9,-9,-9,-9,                                // Decimal 91 - 94      63,                                         // Underscore at decimal 95      -9,                                         // Decimal 96      26,27,28,29,30,31,32,33,34,35,36,37,38,     // Letters 'a' through 'm'      39,40,41,42,43,44,45,46,47,48,49,50,51,     // Letters 'n' through 'z'      -9,-9,-9,-9                                 // Decimal 123 - 126      /*,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 127 - 139      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 140 - 152      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 153 - 165      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 166 - 178      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 179 - 191      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 192 - 204      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 205 - 217      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 218 - 230      -9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,-9,     // Decimal 231 - 243

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人综合亚洲网站| 国产精品色噜噜| 久久久久国产免费免费| 日韩毛片精品高清免费| 毛片一区二区三区| 日本韩国欧美一区| 国产嫩草影院久久久久| 蜜芽一区二区三区| 欧美在线观看一区二区| 国产精品免费看片| 捆绑调教美女网站视频一区| 91国偷自产一区二区开放时间 | 欧美四级电影在线观看| 精品国产伦一区二区三区观看体验| 国产精品国产馆在线真实露脸 | 一区二区三区欧美视频| 高清av一区二区| 欧美一区二区在线播放| 日韩欧美综合在线| 欧美精品v日韩精品v韩国精品v| 亚洲国产精品v| 久久99精品一区二区三区| 欧美在线色视频| 亚洲欧洲中文日韩久久av乱码| 国产综合色在线视频区| 欧美成人官网二区| 秋霞午夜鲁丝一区二区老狼| 欧美视频日韩视频在线观看| 亚洲欧美成aⅴ人在线观看| 成人午夜看片网址| 欧美激情一区二区| 成人午夜在线免费| 国产精品久久久久影视| 成人综合婷婷国产精品久久蜜臀 | www.在线欧美| 日本一区二区免费在线观看视频 | 亚洲成人激情社区| 日本丰满少妇一区二区三区| 一区二区三区国产精华| 欧美亚洲一区二区在线| 亚洲影院在线观看| 精品视频在线免费看| 午夜精品123| 日韩午夜激情电影| 国内成+人亚洲+欧美+综合在线| 欧美成人一区二区三区片免费 | 日韩美女视频19| 欧洲激情一区二区| 视频一区二区三区入口| 6080yy午夜一二三区久久| 日韩av一级电影| 精品国产免费一区二区三区香蕉| 国产在线播放一区| 中文字幕亚洲一区二区av在线| 91天堂素人约啪| 亚洲图片欧美视频| 日韩精品在线看片z| 国产成人久久精品77777最新版本| 欧美高清在线一区| 欧美成人一区二区三区| 韩国av一区二区三区| 亚洲视频一区二区在线| 欧美精品电影在线播放| 国产麻豆午夜三级精品| 综合久久给合久久狠狠狠97色| 欧美视频一二三区| 国产成人免费在线| 亚洲主播在线观看| 久久久一区二区| 欧美亚洲国产一区二区三区| 美日韩一区二区| 亚洲人成影院在线观看| 日韩精品一区二区三区四区| av在线播放一区二区三区| 国产视频一区不卡| 欧美专区日韩专区| 精品一区二区免费在线观看| 综合激情网...| 日韩精品中文字幕一区| 色94色欧美sute亚洲线路一ni | 国产三级欧美三级| 欧美午夜精品一区| 国产真实精品久久二三区| 亚洲一区日韩精品中文字幕| 26uuu国产日韩综合| 欧美午夜在线观看| av在线不卡电影| 国产在线视频精品一区| 天堂一区二区在线免费观看| 中文字幕日韩av资源站| 26uuu另类欧美亚洲曰本| 国产精品情趣视频| 欧美成人官网二区| 欧美浪妇xxxx高跟鞋交| 亚洲自拍偷拍综合| 日韩免费视频线观看| 欧美日韩中文一区| 一本久久a久久精品亚洲| 国产盗摄精品一区二区三区在线| 亚洲bdsm女犯bdsm网站| 亚洲精品亚洲人成人网在线播放| 国产午夜精品一区二区三区嫩草| 91精品国产色综合久久| 欧美性受xxxx| 在线一区二区三区四区| 91香蕉国产在线观看软件| 成人av在线影院| 国产成人午夜99999| 国产精品一区二区在线观看不卡| 日韩精品欧美精品| 五月婷婷激情综合| 亚洲国产一区二区a毛片| 一区二区三区在线观看视频| 亚洲精品视频在线观看免费 | 国产精品久久久久久久久免费樱桃 | 欧美区视频在线观看| 99久久精品免费观看| 成人激情免费网站| 成人福利视频在线| av电影在线观看一区| 95精品视频在线| 日本韩国欧美在线| 欧美精品丝袜中出| 日韩精品一区二区三区视频 | 在线精品视频一区二区三四| 成人激情电影免费在线观看| 本田岬高潮一区二区三区| 成人网页在线观看| 色综合久久综合网欧美综合网| 91麻豆高清视频| 欧美性生活影院| 欧美xxxx老人做受| 国产精品网曝门| 专区另类欧美日韩| 婷婷成人激情在线网| 麻豆国产91在线播放| 国产精品一区二区视频| av毛片久久久久**hd| 91九色02白丝porn| 在线播放/欧美激情| 久久亚洲综合色一区二区三区| 欧美国产禁国产网站cc| 亚洲午夜激情网页| 老汉av免费一区二区三区| 国产91丝袜在线播放| 欧美在线免费观看亚洲| 欧美va亚洲va国产综合| 国产精品久久久久精k8| 视频一区免费在线观看| 国产精品99久| 欧洲亚洲精品在线| 99精品视频一区二区三区| 2020国产精品自拍| 亚洲欧美在线高清| 91免费版在线看| 欧美精品18+| 国产精品久线在线观看| 亚洲成人av中文| 成人av电影在线播放| 在线电影欧美成精品| 国产精品美女久久久久久久久 | 久久久亚洲国产美女国产盗摄| 亚洲日本韩国一区| 看国产成人h片视频| 在线亚洲人成电影网站色www| 日韩女同互慰一区二区| 亚洲精品视频在线看| 国产高清久久久久| 欧美一二三区在线观看| 最新高清无码专区| 国产精品自在欧美一区| 91精品综合久久久久久| 亚洲色图一区二区三区| 国产精品456露脸| 日韩午夜激情av| 一区二区三区国产精华| 不卡的电影网站| www国产成人免费观看视频 深夜成人网| 欧美精品aⅴ在线视频| 国产蜜臀97一区二区三区 | 日韩一级成人av| 日韩理论片一区二区| 国产美女视频91| 精品裸体舞一区二区三区| 日韩精品每日更新| 欧美片网站yy| 亚洲高清中文字幕| 欧美日韩中文字幕一区| 一区二区三区不卡在线观看| 成人av网站免费| 国产精品乱码一区二区三区软件 | 视频精品一区二区| 欧美色视频一区| 亚洲国产乱码最新视频| 一本大道久久a久久综合| 国产精品国模大尺度视频| 风间由美性色一区二区三区| 久久精品人人做人人爽人人| 久久精品免费看| 亚洲精品在线三区|