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

  • 大小: 28KB
    文件類型: .java
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-05
  • 語言: Java
  • 標(biāo)簽: android??Base64??

資源簡介

android Base64 類,源碼,copy過去 即可用

資源截圖

代碼片段和文件信息

/*
?*?Copyright?(C)?2010?The?Android?Open?Source?Project
?*
?*?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
?*?you?may?not?use?this?file?except?in?compliance?with?the?License.
?*?You?may?obtain?a?copy?of?the?License?at
?*
?*??????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/

package?android.util;

import?java.io.UnsupportedEncodingException;

/**
?*?Utilities?for?encoding?and?decoding?the?base64?representation?of
?*?binary?data.??See?RFCs??*?href=“http://www.ietf.org/rfc/rfc2045.txt“>2045?and??*?href=“http://www.ietf.org/rfc/rfc3548.txt“>3548.
?*/
public?class?base64?{
????/**
?????*?Default?values?for?encoder/decoder?flags.
?????*/
????public?static?final?int?DEFAULT?=?0;

????/**
?????*?Encoder?flag?bit?to?omit?the?padding?‘=‘?characters?at?the?end
?????*?of?the?output?(if?any).
?????*/
????public?static?final?int?NO_PADDING?=?1;

????/**
?????*?Encoder?flag?bit?to?omit?all?line?terminators?(i.e.?the?output
?????*?will?be?on?one?long?line).
?????*/
????public?static?final?int?NO_WRAP?=?2;

????/**
?????*?Encoder?flag?bit?to?indicate?lines?should?be?terminated?with?a
?????*?CRLF?pair?instead?of?just?an?LF.??Has?no?effect?if?{@code
?????*?NO_WRAP}?is?specified?as?well.
?????*/
????public?static?final?int?CRLF?=?4;

????/**
?????*?Encoder/decoder?flag?bit?to?indicate?using?the?“URL?and
?????*?filename?safe“?variant?of?base64?(see?RFC?3548?section?4)?where
?????*?{@code?-}?and?{@code?_}?are?used?in?place?of?{@code?+}?and
?????*?{@code?/}.
?????*/
????public?static?final?int?URL_SAFE?=?8;

????/**
?????*?Flag?to?pass?to?{@link?base64OutputStream}?to?indicate?that?it
?????*?should?not?close?the?output?stream?it?is?wrapping?when?it
?????*?itself?is?closed.
?????*/
????public?static?final?int?NO_CLOSE?=?16;

????//??--------------------------------------------------------
????//??shared?code
????//??--------------------------------------------------------

????/*?package?*/?static?abstract?class?Coder?{
????????public?byte[]?output;
????????public?int?op;

????????/**
?????????*?Encode/decode?another?block?of?input?data.??this.output?is
?????????*?provided?by?the?caller?and?must?be?big?enough?to?hold?all
?????????*?the?coded?data.??On?exit?this.opwill?be?set?to?the?length
?????????*?of?the?coded?data.
?????????*
?????????*?@param?finish?true?if?this?is?the?final?call?to?process?for
?????????*????????this?object.??Will?finalize?the?coder?state?and
?????????*????????include?any?final?bytes?in?the?output.
?????????*
?????????*?@return?true?if?the?input?so?far?is?good;?false?if?some
?????????*?????????error?has?been?detected?in?the?input?stream..
?????????*/
????????public?abstract?boolean?process(byt

評論

共有 條評論