当前位置: 首页>>代码示例>>Java>>正文


Java Base64Variant.encodeBase64Chunk方法代码示例

本文整理汇总了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;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:60,代码来源:WriterBasedJsonGenerator.java

示例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;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:60,代码来源:UTF8JsonGenerator.java


注:本文中的com.fasterxml.jackson.core.Base64Variant.encodeBase64Chunk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。