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

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

?? base64.java

?? Encodes and decodes to and from Base64 notation
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
     * Example: <code>encodeObject( myObj, Base64.GZIP )</code> or     * <p>     * Example: <code>encodeObject( myObj, Base64.GZIP | Base64.DO_BREAK_LINES )</code>     *     * @param serializableObject The object to encode     * @param options Specified options     * @return The Base64-encoded object     * @see Base64#GZIP     * @see Base64#DO_BREAK_LINES     * @throws java.io.IOException if there is an error     * @since 2.0     */    public static String encodeObject( java.io.Serializable serializableObject, int options )    throws java.io.IOException {        if( serializableObject == null ){            throw new NullPointerException( "Cannot serialize a null object." );        }   // end if: null                // Streams        java.io.ByteArrayOutputStream  baos  = null;         java.io.OutputStream           b64os = null;         java.io.ObjectOutputStream     oos   = null;                         try {            // ObjectOutputStream -> (GZIP) -> Base64 -> ByteArrayOutputStream            // Note that the optional GZIPping is handled by Base64.OutputStream.            baos  = new java.io.ByteArrayOutputStream();            b64os = new Base64.OutputStream( baos, ENCODE | options );            oos   = new java.io.ObjectOutputStream( b64os );            oos.writeObject( serializableObject );        }   // end try        catch( java.io.IOException e ) {            // Catch it and then throw it immediately so that            // the finally{} block is called for cleanup.            throw e;        }   // end catch        finally {            try{ oos.close();   } catch( Exception e ){}            try{ b64os.close(); } catch( Exception e ){}            try{ baos.close();  } catch( Exception e ){}        }   // end finally                // Return value according to relevant encoding.        try {            return new String( baos.toByteArray(), PREFERRED_ENCODING );        }   // end try        catch (java.io.UnsupportedEncodingException uue){            // Fall back to some Java default            return new String( baos.toByteArray() );        }   // end catch            }   // end encode            /**     * Encodes a byte array into Base64 notation.     * Does not GZip-compress data.     *       * @param source The data to convert     * @return The data in Base64-encoded form     * @throws NullPointerException if source array is null     * @since 1.4     */    public static String encodeBytes( byte[] source ) {        // Since we're not going to have the GZIP encoding turned on,        // we're not going to have an java.io.IOException thrown, so        // we should not force the user to have to catch it.        String encoded = null;        try {            encoded = encodeBytes(source, 0, source.length, NO_OPTIONS);        } catch (java.io.IOException ex) {            assert false : ex.getMessage();        }   // end catch        assert encoded != null;        return encoded;    }   // end encodeBytes        /**     * Encodes a byte array into Base64 notation.     * <p>     * Example options:<pre>     *   GZIP: gzip-compresses object before encoding it.     *   DO_BREAK_LINES: break lines at 76 characters     *     <i>Note: Technically, this makes your encoding non-compliant.</i>     * </pre>     * <p>     * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or     * <p>     * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code>     *     *       * <p>As of v 2.3, if there is an error with the GZIP stream,     * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>     * In earlier versions, it just returned a null value, but     * in retrospect that's a pretty poor way to handle it.</p>     *      *     * @param source The data to convert     * @param options Specified options     * @return The Base64-encoded data as a String     * @see Base64#GZIP     * @see Base64#DO_BREAK_LINES     * @throws java.io.IOException if there is an error     * @throws NullPointerException if source array is null     * @since 2.0     */    public static String encodeBytes( byte[] source, int options ) throws java.io.IOException {        return encodeBytes( source, 0, source.length, options );    }   // end encodeBytes            /**     * Encodes a byte array into Base64 notation.     * Does not GZip-compress data.     *       * <p>As of v 2.3, if there is an error,     * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>     * In earlier versions, it just returned a null value, but     * in retrospect that's a pretty poor way to handle it.</p>     *      *     * @param source The data to convert     * @param off Offset in array where conversion should begin     * @param len Length of data to convert     * @return The Base64-encoded data as a String     * @throws NullPointerException if source array is null     * @throws IllegalArgumentException if source array, offset, or length are invalid     * @since 1.4     */    public static String encodeBytes( byte[] source, int off, int len ) {        // Since we're not going to have the GZIP encoding turned on,        // we're not going to have an java.io.IOException thrown, so        // we should not force the user to have to catch it.        String encoded = null;        try {            encoded = encodeBytes( source, off, len, NO_OPTIONS );        } catch (java.io.IOException ex) {            assert false : ex.getMessage();        }   // end catch        assert encoded != null;        return encoded;    }   // end encodeBytes            /**     * Encodes a byte array into Base64 notation.     * <p>     * Example options:<pre>     *   GZIP: gzip-compresses object before encoding it.     *   DO_BREAK_LINES: break lines at 76 characters     *     <i>Note: Technically, this makes your encoding non-compliant.</i>     * </pre>     * <p>     * Example: <code>encodeBytes( myData, Base64.GZIP )</code> or     * <p>     * Example: <code>encodeBytes( myData, Base64.GZIP | Base64.DO_BREAK_LINES )</code>     *     *       * <p>As of v 2.3, if there is an error with the GZIP stream,     * the method will throw an java.io.IOException. <b>This is new to v2.3!</b>     * In earlier versions, it just returned a null value, but     * in retrospect that's a pretty poor way to handle it.</p>     *      *     * @param source The data to convert     * @param off Offset in array where conversion should begin     * @param len Length of data to convert     * @param options Specified options     * @return The Base64-encoded data as a String     * @see Base64#GZIP     * @see Base64#DO_BREAK_LINES     * @throws java.io.IOException if there is an error     * @throws NullPointerException if source array is null     * @throws IllegalArgumentException if source array, offset, or length are invalid     * @since 2.0     */    public static String encodeBytes( byte[] source, int off, int len, int options ) throws java.io.IOException {        byte[] encoded = encodeBytesToBytes( source, off, len, options );        // Return value according to relevant encoding.        try {            return new String( encoded, PREFERRED_ENCODING );        }   // end try        catch (java.io.UnsupportedEncodingException uue) {            return new String( encoded );        }   // end catch            }   // end encodeBytes    /**     * Similar to {@link #encodeBytes(byte[])} but returns     * a byte array instead of instantiating a String. This is more efficient     * if you're working with I/O streams and have large data sets to encode.     *     *     * @param source The data to convert     * @return The Base64-encoded data as a byte[] (of ASCII characters)     * @throws NullPointerException if source array is null     * @since 2.3.1     */    public static byte[] encodeBytesToBytes( byte[] source ) {        byte[] encoded = null;        try {            encoded = encodeBytesToBytes( source, 0, source.length, Base64.NO_OPTIONS );        } catch( IOException ex ) {            assert false : "IOExceptions only come from GZipping, which is turned off: " + ex.getMessage();        }        return encoded;    }    /**     * Similar to {@link #encodeBytes(byte[], int, int, int)} but returns     * a byte array instead of instantiating a String. This is more efficient     * if you're working with I/O streams and have large data sets to encode.     *     *     * @param source The data to convert     * @param off Offset in array where conversion should begin     * @param len Length of data to convert     * @param options Specified options     * @return The Base64-encoded data as a String     * @see Base64#GZIP     * @see Base64#DO_BREAK_LINES     * @throws java.io.IOException if there is an error     * @throws NullPointerException if source array is null     * @throws IllegalArgumentException if source array, offset, or length are invalid     * @since 2.3.1     */    public static byte[] encodeBytesToBytes( byte[] source, int off, int len, int options ) throws java.io.IOException {        if( source == null ){            throw new NullPointerException( "Cannot serialize a null array." );        }   // end if: null        if( off < 0 ){            throw new IllegalArgumentException( "Cannot have negative offset: " + off );        }   // end if: off < 0        if( len < 0 ){            throw new IllegalArgumentException( "Cannot have length offset: " + len );        }   // end if: len < 0        if( off + len > source.length  ){            throw new IllegalArgumentException(            String.format( "Cannot have offset of %d and length of %d with array of length %d", off,len,source.length));        }   // end if: off < 0        // Compress?        if( (options & GZIP) > 0 ) {            java.io.ByteArrayOutputStream  baos  = null;            java.util.zip.GZIPOutputStream gzos  = null;            Base64.OutputStream            b64os = null;            try {                // GZip -> Base64 -> ByteArray                baos = new java.io.ByteArrayOutputStream();                b64os = new Base64.OutputStream( baos, ENCODE | options );                gzos  = new java.util.zip.GZIPOutputStream( b64os );                gzos.write( source, off, len );                gzos.close();            }   // end try            catch( java.io.IOException e ) {                // Catch it and then throw it immediately so that                // the finally{} block is called for cleanup.                throw e;            }   // end catch            finally {                try{ gzos.close();  } catch( Exception e ){}                try{ b64os.close(); } catch( Exception e ){}                try{ baos.close();  } catch( Exception e ){}            }   // end finally            return baos.toByteArray();        }   // end if: compress        // Else, don't compress. Better not to use streams at all then.        else {            boolean breakLines = (options & DO_BREAK_LINES) > 0;            int    len43   = len * 4 / 3;            byte[] outBuff = new byte[   ( len43 )                      // Main 4:3                                       + ( (len % 3) > 0 ? 4 : 0 )      // Account for padding                                       + (breakLines ? ( len43 / MAX_LINE_LENGTH ) : 0) ]; // New lines            int d = 0;            int e = 0;            int len2 = len - 2;            int lineLength = 0;            for( ; d < len2; d+=3, e+=4 ) {                encode3to4( source, d+off, 3, outBuff, e, options );                lineLength += 4;                if( breakLines && lineLength == MAX_LINE_LENGTH )                {                    outBuff[e+4] = NEW_LINE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区激情小说| 国产精品无遮挡| 色美美综合视频| 99久久亚洲一区二区三区青草| 激情深爱一区二区| 激情文学综合网| 国产福利一区二区三区在线视频| 精品一区二区在线视频| 国产精品一品二品| 懂色av一区二区三区免费看| 成人一道本在线| 9l国产精品久久久久麻豆| 色综合久久天天| 欧美日韩欧美一区二区| 欧美精品少妇一区二区三区| 日韩天堂在线观看| 久久久国产精品午夜一区ai换脸| 久久亚洲二区三区| 亚洲人精品一区| 亚洲v中文字幕| 国内精品国产成人| aaa国产一区| 欧美男男青年gay1069videost| 日韩一区二区三区视频在线观看 | 日本一区二区成人在线| 日本一区二区三级电影在线观看 | 久久精品男人的天堂| 国产精品女同一区二区三区| 亚洲色图都市小说| 日韩中文字幕91| 国产高清在线观看免费不卡| 日本韩国一区二区三区| 欧美一区二区视频在线观看2020| 日韩精品一区二区三区三区免费| 欧美激情资源网| 亚洲高清久久久| 国产成人午夜高潮毛片| 欧美在线不卡视频| 国产调教视频一区| 亚洲成人第一页| 成人av网址在线观看| 777亚洲妇女| 国产精品国模大尺度视频| 日韩经典一区二区| 91色porny| 久久婷婷国产综合国色天香| 亚洲高清免费一级二级三级| 国产激情精品久久久第一区二区| 色系网站成人免费| 国产三区在线成人av| 亚洲国产精品欧美一二99| 福利一区在线观看| 欧美va在线播放| 亚洲一区二区在线观看视频 | 欧美一区二区在线免费观看| 亚洲欧美一区二区视频| 精品一区免费av| 欧美伦理电影网| 亚洲视频在线一区观看| 国产福利精品一区二区| 日韩欧美国产1| 日产国产高清一区二区三区| 91精彩视频在线观看| 国产精品初高中害羞小美女文| 久久av资源网| 精品少妇一区二区三区在线播放 | 色婷婷久久久久swag精品 | 色综合天天狠狠| 日本一二三四高清不卡| 国产一区日韩二区欧美三区| 日韩一区二区在线看| 天堂在线一区二区| 欧美群妇大交群中文字幕| 亚洲免费av高清| 色综合久久天天| 亚洲一区二区三区四区在线免费观看 | 成人永久免费视频| 亚洲国产高清在线| 成熟亚洲日本毛茸茸凸凹| 国产亚洲精品资源在线26u| 国产一区二区三区免费| 久久久精品国产免大香伊| 国产精品综合av一区二区国产馆| 欧美成人性战久久| 国产风韵犹存在线视精品| 久久免费国产精品| 波多野结衣在线一区| 国产精品国模大尺度视频| 欧美一区二区精品久久911| 性感美女久久精品| 欧美一二三区在线观看| 激情欧美日韩一区二区| 中文字幕成人av| 91在线国内视频| 午夜精品影院在线观看| 欧美一区二区三区四区高清| 国产一区二区三区免费播放| 国产精品美女视频| 精品视频在线免费看| 免费欧美在线视频| 中文字幕va一区二区三区| 色婷婷久久一区二区三区麻豆| 亚洲成人午夜影院| 亚洲精品在线观看网站| 99精品久久久久久| 丝袜国产日韩另类美女| 国产无遮挡一区二区三区毛片日本| eeuss影院一区二区三区| 亚洲国产一区视频| 久久久美女毛片| 91国在线观看| 国产一区二区不卡在线| 一区二区三区精品视频| 久久综合九色综合欧美98| 色婷婷综合五月| 精品一二线国产| 亚洲国产精品一区二区www| 日韩免费一区二区| 日本久久一区二区| 国产精品一区免费视频| 午夜精品久久久久久| 国产精品少妇自拍| 欧美videofree性高清杂交| 在线视频综合导航| 国产成人免费高清| 日产精品久久久久久久性色| 亚洲日本护士毛茸茸| 久久精品视频网| 日韩色在线观看| 欧美日韩精品一区视频| 99久久99久久久精品齐齐| 国内精品伊人久久久久影院对白| 一区二区三区四区国产精品| 欧美激情综合五月色丁香小说| 这里只有精品电影| 欧美亚洲免费在线一区| caoporen国产精品视频| 激情综合色丁香一区二区| 亚洲h精品动漫在线观看| 亚洲精品视频在线看| 国产精品第五页| 亚洲国产岛国毛片在线| 久久精品人人爽人人爽| 精品久久久久久无| 日韩欧美第一区| 欧美一区午夜视频在线观看| 欧美日韩aaaaa| 欧美挠脚心视频网站| 欧美婷婷六月丁香综合色| 91麻豆精品秘密| 99久久99久久精品免费看蜜桃| 高清不卡在线观看| 成人午夜免费视频| caoporn国产精品| 成人黄色av电影| 不卡在线视频中文字幕| caoporen国产精品视频| av在线一区二区三区| 91日韩精品一区| 欧洲另类一二三四区| 欧美日韩国产综合草草| 欧美人与禽zozo性伦| 911国产精品| 日韩欧美国产wwwww| 久久久久久久电影| 国产精品你懂的| 亚洲激情网站免费观看| 亚洲国产另类av| 美脚の诱脚舐め脚责91| 国产精品亚洲综合一区在线观看| 国产精品一级在线| 99久久综合99久久综合网站| 色综合久久久网| 日韩一级免费观看| 国产午夜精品久久久久久久| 成人免费在线播放视频| 午夜精品久久久久久久久久久| 喷水一区二区三区| 成人精品gif动图一区| 日本精品一区二区三区高清| 欧美一区在线视频| 中日韩av电影| 亚洲成av人片一区二区三区| 精久久久久久久久久久| 成人av中文字幕| 9191久久久久久久久久久| 久久精品一区八戒影视| 亚洲精品成a人| 久久超级碰视频| 日本福利一区二区| 精品国产露脸精彩对白| 亚洲欧美视频一区| 韩国女主播成人在线| 在线免费观看一区| 久久久久久久综合色一本| 夜夜夜精品看看| 国产白丝精品91爽爽久久| 欧美日韩一区二区欧美激情| 国产日本欧洲亚洲| 三级久久三级久久久|