本文整理汇总了Java中com.fasterxml.jackson.core.Base64Variant.encodeBase64Chunk方法的典型用法代码示例。如果您正苦于以下问题:Java Base64Variant.encodeBase64Chunk方法的具体用法?Java Base64Variant.encodeBase64Chunk怎么用?Java Base64Variant.encodeBase64Chunk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.fasterxml.jackson.core.Base64Variant
的用法示例。
在下文中一共展示了Base64Variant.encodeBase64Chunk方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _writeBinary
import com.fasterxml.jackson.core.Base64Variant; //导入方法依赖的package包/类
protected final int _writeBinary(Base64Variant paramBase64Variant, InputStream paramInputStream, byte[] paramArrayOfByte)
{
int i = 0;
int j = 0;
int k = -3;
int m = 0;
int n = -6 + this._outputEnd;
int i1 = paramBase64Variant.getMaxLineLength() >> 2;
while (true)
{
if (i > k)
{
j = _readMore(paramInputStream, paramArrayOfByte, i, j, paramArrayOfByte.length);
i = 0;
if (j < 3)
break;
k = j - 3;
}
if (this._outputTail > n)
_flushBuffer();
int i2 = i;
int i3 = i + 1;
int i4 = paramArrayOfByte[i2] << 8;
int i5 = i3 + 1;
int i6 = (i4 | 0xFF & paramArrayOfByte[i3]) << 8;
i = i5 + 1;
int i7 = i6 | 0xFF & paramArrayOfByte[i5];
m += 3;
this._outputTail = paramBase64Variant.encodeBase64Chunk(i7, this._outputBuffer, this._outputTail);
i1--;
if (i1 <= 0)
{
char[] arrayOfChar1 = this._outputBuffer;
int i8 = this._outputTail;
this._outputTail = (i8 + 1);
arrayOfChar1[i8] = '\\';
char[] arrayOfChar2 = this._outputBuffer;
int i9 = this._outputTail;
this._outputTail = (i9 + 1);
arrayOfChar2[i9] = 'n';
i1 = paramBase64Variant.getMaxLineLength() >> 2;
}
}
if (j > 0)
{
if (this._outputTail > n)
_flushBuffer();
int i10 = paramArrayOfByte[0] << 16;
int i11 = 1;
if (1 < j)
{
i10 |= (0xFF & paramArrayOfByte[1]) << 8;
i11 = 2;
}
m += i11;
this._outputTail = paramBase64Variant.encodeBase64Partial(i10, i11, this._outputBuffer, this._outputTail);
}
return m;
}
示例2: _writeBinary
import com.fasterxml.jackson.core.Base64Variant; //导入方法依赖的package包/类
protected int _writeBinary(Base64Variant paramBase64Variant, InputStream paramInputStream, byte[] paramArrayOfByte)
{
int i = 0;
int j = 0;
int k = -3;
int m = 0;
int n = -6 + this._outputEnd;
int i1 = paramBase64Variant.getMaxLineLength() >> 2;
while (true)
{
if (i > k)
{
j = _readMore(paramInputStream, paramArrayOfByte, i, j, paramArrayOfByte.length);
i = 0;
if (j < 3)
break;
k = j - 3;
}
if (this._outputTail > n)
_flushBuffer();
int i2 = i;
int i3 = i + 1;
int i4 = paramArrayOfByte[i2] << 8;
int i5 = i3 + 1;
int i6 = (i4 | 0xFF & paramArrayOfByte[i3]) << 8;
i = i5 + 1;
int i7 = i6 | 0xFF & paramArrayOfByte[i5];
m += 3;
this._outputTail = paramBase64Variant.encodeBase64Chunk(i7, this._outputBuffer, this._outputTail);
i1--;
if (i1 <= 0)
{
byte[] arrayOfByte1 = this._outputBuffer;
int i8 = this._outputTail;
this._outputTail = (i8 + 1);
arrayOfByte1[i8] = 92;
byte[] arrayOfByte2 = this._outputBuffer;
int i9 = this._outputTail;
this._outputTail = (i9 + 1);
arrayOfByte2[i9] = 110;
i1 = paramBase64Variant.getMaxLineLength() >> 2;
}
}
if (j > 0)
{
if (this._outputTail > n)
_flushBuffer();
int i10 = paramArrayOfByte[0] << 16;
int i11 = 1;
if (1 < j)
{
i10 |= (0xFF & paramArrayOfByte[1]) << 8;
i11 = 2;
}
m += i11;
this._outputTail = paramBase64Variant.encodeBase64Partial(i10, i11, this._outputBuffer, this._outputTail);
}
return m;
}