本文整理汇总了Java中org.codehaus.jackson.Base64Variant类的典型用法代码示例。如果您正苦于以下问题:Java Base64Variant类的具体用法?Java Base64Variant怎么用?Java Base64Variant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Base64Variant类属于org.codehaus.jackson包,在下文中一共展示了Base64Variant类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: _reportInvalidBase64
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected void _reportInvalidBase64(Base64Variant paramBase64Variant, char paramChar, int paramInt, String paramString)
throws JsonParseException
{
String str;
if (paramChar <= ' ')
str = "Illegal white space character (code 0x" + Integer.toHexString(paramChar) + ") as character #" + (paramInt + 1) + " of 4-char base64 unit: can only used between units";
while (true)
{
if (paramString != null)
str = str + ": " + paramString;
throw _constructError(str);
if (paramBase64Variant.usesPaddingChar(paramChar))
{
str = "Unexpected padding character ('" + paramBase64Variant.getPaddingChar() + "') as character #" + (paramInt + 1) + " of 4-char base64 unit: padding only legal as 3rd or 4th character";
continue;
}
if ((!Character.isDefined(paramChar)) || (Character.isISOControl(paramChar)))
{
str = "Illegal character (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
continue;
}
str = "Illegal character '" + paramChar + "' (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:25,代码来源:TokenBuffer.java
示例2: getBinaryValue
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public byte[] getBinaryValue(Base64Variant paramBase64Variant)
throws IOException, JsonParseException
{
if (this._currToken == JsonToken.VALUE_EMBEDDED_OBJECT)
{
Object localObject = _currentObject();
if ((localObject instanceof byte[]))
return (byte[])(byte[])localObject;
}
if (this._currToken != JsonToken.VALUE_STRING)
throw _constructError("Current token (" + this._currToken + ") not VALUE_STRING (or VALUE_EMBEDDED_OBJECT with byte[]), can not access as binary");
String str = getText();
if (str == null)
return null;
ByteArrayBuilder localByteArrayBuilder = this._byteBuilder;
if (localByteArrayBuilder == null)
{
localByteArrayBuilder = new ByteArrayBuilder(100);
this._byteBuilder = localByteArrayBuilder;
}
_decodeBase64(str, localByteArrayBuilder, paramBase64Variant);
return localByteArrayBuilder.toByteArray();
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:24,代码来源:TokenBuffer.java
示例3: _decodeBase64Escape
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
private final int _decodeBase64Escape(Base64Variant paramBase64Variant, char paramChar, int paramInt)
throws IOException, JsonParseException
{
if (paramChar != '\\')
throw reportInvalidChar(paramBase64Variant, paramChar, paramInt);
char c = _decodeEscaped();
int i;
if ((c <= ' ') && (paramInt == 0))
i = -1;
do
{
return i;
i = paramBase64Variant.decodeBase64Char(c);
}
while (i >= 0);
throw reportInvalidChar(paramBase64Variant, c, paramInt);
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:18,代码来源:ReaderBasedParser.java
示例4: getBinaryValue
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public byte[] getBinaryValue(Base64Variant paramBase64Variant)
throws IOException, JsonParseException
{
if ((this._currToken != JsonToken.VALUE_STRING) && ((this._currToken != JsonToken.VALUE_EMBEDDED_OBJECT) || (this._binaryValue == null)))
_reportError("Current token (" + this._currToken + ") not VALUE_STRING or VALUE_EMBEDDED_OBJECT, can not access as binary");
if (this._tokenIncomplete);
try
{
this._binaryValue = _decodeBase64(paramBase64Variant);
this._tokenIncomplete = false;
return this._binaryValue;
}
catch (IllegalArgumentException localIllegalArgumentException)
{
}
throw _constructError("Failed to decode VALUE_STRING as base64 (" + paramBase64Variant + "): " + localIllegalArgumentException.getMessage());
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:18,代码来源:ReaderBasedParser.java
示例5: reportInvalidChar
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected IllegalArgumentException reportInvalidChar(Base64Variant paramBase64Variant, char paramChar, int paramInt, String paramString)
throws IllegalArgumentException
{
String str;
if (paramChar <= ' ')
str = "Illegal white space character (code 0x" + Integer.toHexString(paramChar) + ") as character #" + (paramInt + 1) + " of 4-char base64 unit: can only used between units";
while (true)
{
if (paramString != null)
str = str + ": " + paramString;
return new IllegalArgumentException(str);
if (paramBase64Variant.usesPaddingChar(paramChar))
{
str = "Unexpected padding character ('" + paramBase64Variant.getPaddingChar() + "') as character #" + (paramInt + 1) + " of 4-char base64 unit: padding only legal as 3rd or 4th character";
continue;
}
if ((!Character.isDefined(paramChar)) || (Character.isISOControl(paramChar)))
{
str = "Illegal character (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
continue;
}
str = "Illegal character '" + paramChar + "' (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:25,代码来源:ReaderBasedParser.java
示例6: _decodeBase64Escape
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
private final int _decodeBase64Escape(Base64Variant paramBase64Variant, int paramInt1, int paramInt2)
throws IOException, JsonParseException
{
if (paramInt1 != 92)
throw reportInvalidChar(paramBase64Variant, paramInt1, paramInt2);
int i = _decodeEscaped();
int j;
if ((i <= 32) && (paramInt2 == 0))
j = -1;
do
{
return j;
j = paramBase64Variant.decodeBase64Char(i);
}
while (j >= 0);
throw reportInvalidChar(paramBase64Variant, i, paramInt2);
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:18,代码来源:Utf8StreamParser.java
示例7: reportInvalidChar
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected IllegalArgumentException reportInvalidChar(Base64Variant paramBase64Variant, int paramInt1, int paramInt2, String paramString)
throws IllegalArgumentException
{
String str;
if (paramInt1 <= 32)
str = "Illegal white space character (code 0x" + Integer.toHexString(paramInt1) + ") as character #" + (paramInt2 + 1) + " of 4-char base64 unit: can only used between units";
while (true)
{
if (paramString != null)
str = str + ": " + paramString;
return new IllegalArgumentException(str);
if (paramBase64Variant.usesPaddingChar(paramInt1))
{
str = "Unexpected padding character ('" + paramBase64Variant.getPaddingChar() + "') as character #" + (paramInt2 + 1) + " of 4-char base64 unit: padding only legal as 3rd or 4th character";
continue;
}
if ((!Character.isDefined(paramInt1)) || (Character.isISOControl(paramInt1)))
{
str = "Illegal character (code 0x" + Integer.toHexString(paramInt1) + ") in base64 content";
continue;
}
str = "Illegal character '" + (char)paramInt1 + "' (code 0x" + Integer.toHexString(paramInt1) + ") in base64 content";
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:25,代码来源:Utf8StreamParser.java
示例8: writeBinary
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public void writeBinary(Base64Variant paramBase64Variant, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException, JsonGenerationException
{
_verifyValueWrite("write binary value");
if (this._outputTail >= this._outputEnd)
_flushBuffer();
char[] arrayOfChar1 = this._outputBuffer;
int i = this._outputTail;
this._outputTail = (i + 1);
arrayOfChar1[i] = '"';
_writeBinary(paramBase64Variant, paramArrayOfByte, paramInt1, paramInt1 + paramInt2);
if (this._outputTail >= this._outputEnd)
_flushBuffer();
char[] arrayOfChar2 = this._outputBuffer;
int j = this._outputTail;
this._outputTail = (j + 1);
arrayOfChar2[j] = '"';
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:WriterBasedGenerator.java
示例9: writeBinary
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public void writeBinary(Base64Variant paramBase64Variant, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException, JsonGenerationException
{
_verifyValueWrite("write binary value");
if (this._outputTail >= this._outputEnd)
_flushBuffer();
byte[] arrayOfByte1 = this._outputBuffer;
int i = this._outputTail;
this._outputTail = (i + 1);
arrayOfByte1[i] = 34;
_writeBinary(paramBase64Variant, paramArrayOfByte, paramInt1, paramInt1 + paramInt2);
if (this._outputTail >= this._outputEnd)
_flushBuffer();
byte[] arrayOfByte2 = this._outputBuffer;
int j = this._outputTail;
this._outputTail = (j + 1);
arrayOfByte2[j] = 34;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:Utf8Generator.java
示例10: getBinaryValue
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public byte[] getBinaryValue(Base64Variant paramBase64Variant)
throws IOException, JsonParseException
{
JsonNode localJsonNode = currentNode();
if (localJsonNode != null)
{
byte[] arrayOfByte = localJsonNode.getBinaryValue();
if (arrayOfByte != null)
return arrayOfByte;
if (localJsonNode.isPojo())
{
Object localObject = ((POJONode)localJsonNode).getPojo();
if ((localObject instanceof byte[]))
return (byte[])(byte[])localObject;
}
}
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:TreeTraversingParser.java
示例11: _reportInvalidBase64
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected void _reportInvalidBase64(Base64Variant paramBase64Variant, char paramChar, int paramInt, String paramString)
throws JsonParseException
{
String str;
if (paramChar <= ' ')
str = "Illegal white space character (code 0x" + Integer.toHexString(paramChar) + ") as character #" + (paramInt + 1) + " of 4-char base64 unit: can only used between units";
while (true)
{
if (paramString != null)
str = str + ": " + paramString;
throw new JsonParseException(str, JsonLocation.NA);
if (paramBase64Variant.usesPaddingChar(paramChar))
{
str = "Unexpected padding character ('" + paramBase64Variant.getPaddingChar() + "') as character #" + (paramInt + 1) + " of 4-char base64 unit: padding only legal as 3rd or 4th character";
continue;
}
if ((!Character.isDefined(paramChar)) || (Character.isISOControl(paramChar)))
{
str = "Illegal character (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
continue;
}
str = "Illegal character '" + paramChar + "' (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:25,代码来源:TextNode.java
示例12: getBinaryValue
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public final byte[] getBinaryValue(Base64Variant paramBase64Variant)
{
if (this._currToken == JsonToken.VALUE_EMBEDDED_OBJECT)
{
Object localObject = _currentObject();
if ((localObject instanceof byte[]))
return (byte[])localObject;
}
if (this._currToken != JsonToken.VALUE_STRING)
throw _constructError("Current token (" + this._currToken + ") not VALUE_STRING (or VALUE_EMBEDDED_OBJECT with byte[]), can not access as binary");
String str = getText();
if (str == null)
return null;
ByteArrayBuilder localByteArrayBuilder = this._byteBuilder;
if (localByteArrayBuilder == null)
{
localByteArrayBuilder = new ByteArrayBuilder(100);
this._byteBuilder = localByteArrayBuilder;
}
_decodeBase64(str, localByteArrayBuilder, paramBase64Variant);
return localByteArrayBuilder.toByteArray();
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:23,代码来源:TokenBuffer$Parser.java
示例13: getBinaryValue
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public final byte[] getBinaryValue(Base64Variant paramBase64Variant)
{
if ((this._currToken != JsonToken.VALUE_STRING) && ((this._currToken != JsonToken.VALUE_EMBEDDED_OBJECT) || (this._binaryValue == null)))
_reportError("Current token (" + this._currToken + ") not VALUE_STRING or VALUE_EMBEDDED_OBJECT, can not access as binary");
if (this._tokenIncomplete);
while (true)
{
try
{
this._binaryValue = _decodeBase64(paramBase64Variant);
this._tokenIncomplete = false;
return this._binaryValue;
}
catch (IllegalArgumentException localIllegalArgumentException)
{
throw _constructError("Failed to decode VALUE_STRING as base64 (" + paramBase64Variant + "): " + localIllegalArgumentException.getMessage());
}
if (this._binaryValue == null)
{
ByteArrayBuilder localByteArrayBuilder = _getByteArrayBuilder();
_decodeBase64(getText(), localByteArrayBuilder, paramBase64Variant);
this._binaryValue = localByteArrayBuilder.toByteArray();
}
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:26,代码来源:ReaderBasedParser.java
示例14: writeBinary
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public final void writeBinary(Base64Variant paramBase64Variant, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
{
_verifyValueWrite("write binary value");
if (this._outputTail >= this._outputEnd)
_flushBuffer();
char[] arrayOfChar1 = this._outputBuffer;
int i = this._outputTail;
this._outputTail = (i + 1);
arrayOfChar1[i] = '"';
_writeBinary(paramBase64Variant, paramArrayOfByte, paramInt1, paramInt1 + paramInt2);
if (this._outputTail >= this._outputEnd)
_flushBuffer();
char[] arrayOfChar2 = this._outputBuffer;
int j = this._outputTail;
this._outputTail = (j + 1);
arrayOfChar2[j] = '"';
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:18,代码来源:WriterBasedGenerator.java
示例15: _reportInvalidBase64
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected void _reportInvalidBase64(Base64Variant paramBase64Variant, char paramChar, int paramInt, String paramString)
{
String str;
if (paramChar <= ' ')
str = "Illegal white space character (code 0x" + Integer.toHexString(paramChar) + ") as character #" + (paramInt + 1) + " of 4-char base64 unit: can only used between units";
while (true)
{
if (paramString != null)
str = str + ": " + paramString;
throw _constructError(str);
if (paramBase64Variant.usesPaddingChar(paramChar))
str = "Unexpected padding character ('" + paramBase64Variant.getPaddingChar() + "') as character #" + (paramInt + 1) + " of 4-char base64 unit: padding only legal as 3rd or 4th character";
else if ((!Character.isDefined(paramChar)) || (Character.isISOControl(paramChar)))
str = "Illegal character (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
else
str = "Illegal character '" + paramChar + "' (code 0x" + Integer.toHexString(paramChar) + ") in base64 content";
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:JsonParserMinimalBase.java
示例16: writeBinary
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public void writeBinary(Base64Variant paramBase64Variant, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException, JsonGenerationException
{
byte[] arrayOfByte = new byte[paramInt2];
System.arraycopy(paramArrayOfByte, paramInt1, arrayOfByte, 0, paramInt2);
writeObject(arrayOfByte);
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:TokenBuffer.java
示例17: getBase64Variant
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public Base64Variant getBase64Variant()
{
return Base64Variants.getDefaultVariant();
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:5,代码来源:DeserializationConfig.java
示例18: getBase64Variant
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public Base64Variant getBase64Variant()
{
return this._config.getBase64Variant();
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:5,代码来源:DeserializationContext.java
示例19: writeBinary
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
public void writeBinary(Base64Variant paramBase64Variant, byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException, JsonGenerationException
{
this.delegate.writeBinary(paramBase64Variant, paramArrayOfByte, paramInt1, paramInt2);
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:6,代码来源:JsonGeneratorDelegate.java
示例20: _decodeBase64
import org.codehaus.jackson.Base64Variant; //导入依赖的package包/类
protected void _decodeBase64(String paramString, ByteArrayBuilder paramByteArrayBuilder, Base64Variant paramBase64Variant)
throws IOException, JsonParseException
{
int i = 0;
int j = paramString.length();
if (i < j);
while (true)
{
int k = i + 1;
char c1 = paramString.charAt(i);
if (k >= j)
return;
if (c1 > ' ')
{
int m = paramBase64Variant.decodeBase64Char(c1);
if (m < 0)
_reportInvalidBase64(paramBase64Variant, c1, 0, null);
if (k >= j)
_reportBase64EOF();
int n = k + 1;
char c2 = paramString.charAt(k);
int i1 = paramBase64Variant.decodeBase64Char(c2);
if (i1 < 0)
_reportInvalidBase64(paramBase64Variant, c2, 1, null);
int i2 = i1 | m << 6;
if (n >= j)
_reportBase64EOF();
int i3 = n + 1;
char c3 = paramString.charAt(n);
int i4 = paramBase64Variant.decodeBase64Char(c3);
if (i4 < 0)
{
if (i4 != -2)
_reportInvalidBase64(paramBase64Variant, c3, 2, null);
if (i3 >= j)
_reportBase64EOF();
i = i3 + 1;
char c5 = paramString.charAt(i3);
if (!paramBase64Variant.usesPaddingChar(c5))
_reportInvalidBase64(paramBase64Variant, c5, 3, "expected padding character '" + paramBase64Variant.getPaddingChar() + "'");
paramByteArrayBuilder.append(i2 >> 4);
break;
}
int i5 = i4 | i2 << 6;
if (i3 >= j)
_reportBase64EOF();
i = i3 + 1;
char c4 = paramString.charAt(i3);
int i6 = paramBase64Variant.decodeBase64Char(c4);
if (i6 < 0)
{
if (i6 != -2)
_reportInvalidBase64(paramBase64Variant, c4, 3, null);
paramByteArrayBuilder.appendTwoBytes(i5 >> 2);
break;
}
paramByteArrayBuilder.appendThreeBytes(i6 | i5 << 6);
break;
}
i = k;
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:63,代码来源:TokenBuffer.java
注:本文中的org.codehaus.jackson.Base64Variant类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论