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


Java LimitedInputStream类代码示例

本文整理汇总了Java中com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream的典型用法代码示例。如果您正苦于以下问题:Java LimitedInputStream类的具体用法?Java LimitedInputStream怎么用?Java LimitedInputStream使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LimitedInputStream类属于com.google.protobuf.AbstractMessageLite.Builder包,在下文中一共展示了LimitedInputStream类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parsePartialDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
public MessageType parsePartialDelimitedFrom(
    InputStream input,
    ExtensionRegistryLite extensionRegistry)
    throws InvalidProtocolBufferException {
  int size;
  try {
    int firstByte = input.read();
    if (firstByte == -1) {
      return null;
    }
    size = CodedInputStream.readRawVarint32(firstByte, input);
  } catch (IOException e) {
    throw new InvalidProtocolBufferException(e.getMessage());
  }
  InputStream limitedInput = new LimitedInputStream(input, size);
  return parsePartialFrom(limitedInput, extensionRegistry);
}
 
开发者ID:reubenbrown13,项目名称:cfapi,代码行数:18,代码来源:AbstractParser.java

示例2: parsePartialDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
@Override
public MessageType parsePartialDelimitedFrom(
    InputStream input, ExtensionRegistryLite extensionRegistry)
    throws InvalidProtocolBufferException {
  int size;
  try {
    int firstByte = input.read();
    if (firstByte == -1) {
      return null;
    }
    size = CodedInputStream.readRawVarint32(firstByte, input);
  } catch (IOException e) {
    throw new InvalidProtocolBufferException(e.getMessage());
  }
  InputStream limitedInput = new LimitedInputStream(input, size);
  return parsePartialFrom(limitedInput, extensionRegistry);
}
 
开发者ID:yeriomin,项目名称:play-store-api,代码行数:18,代码来源:AbstractParser.java

示例3: parsePartialDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
public MessageType parsePartialDelimitedFrom (
        InputStream input,
        ExtensionRegistryLite extensionRegistry)
        throws InvalidProtocolBufferException {
    int size;
    try {
        int firstByte = input.read ();
        if (firstByte == -1) {
            return null;
        }
        size = CodedInputStream.readRawVarint32 (firstByte, input);
    } catch (IOException e) {
        throw new InvalidProtocolBufferException (e.getMessage ());
    }
    InputStream limitedInput = new LimitedInputStream (input, size);
    return parsePartialFrom (limitedInput, extensionRegistry);
}
 
开发者ID:BFergerson,项目名称:Beam,代码行数:18,代码来源:AbstractParser.java

示例4: parsePartialDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
@Override
public MessageType parsePartialDelimitedFrom(
    InputStream input, ExtensionRegistryLite extensionRegistry)
    throws InvalidProtocolBufferException {
  int size;
  try {
    int firstByte = input.read();
    if (firstByte == -1) {
      return null;
    }
    size = CodedInputStream.readRawVarint32(firstByte, input);
  } catch (IOException e) {
    throw new InvalidProtocolBufferException(e);
  }
  InputStream limitedInput = new LimitedInputStream(input, size);
  return parsePartialFrom(limitedInput, extensionRegistry);
}
 
开发者ID:bazelbuild,项目名称:bazel,代码行数:18,代码来源:AbstractParser.java

示例5: mergeDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
public boolean mergeDelimitedFrom(InputStream input)
    throws IOException {
  final int firstByte = input.read();
  if (firstByte == -1) {
    return false;
  }
  final int size = CodedInputStream.readRawVarint32(firstByte, input);
  final InputStream limitedInput = new LimitedInputStream(input, size);
  mergeFrom(limitedInput);
  return true;
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:12,代码来源:UnknownFieldSet.java

示例6: mergeDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
@Override
public boolean mergeDelimitedFrom(InputStream input) throws IOException {
  final int firstByte = input.read();
  if (firstByte == -1) {
    return false;
  }
  final int size = CodedInputStream.readRawVarint32(firstByte, input);
  final InputStream limitedInput = new LimitedInputStream(input, size);
  mergeFrom(limitedInput);
  return true;
}
 
开发者ID:yeriomin,项目名称:play-store-api,代码行数:12,代码来源:UnknownFieldSet.java

示例7: mergeDelimitedFrom

import com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream; //导入依赖的package包/类
public boolean mergeDelimitedFrom (InputStream input)
        throws IOException {
    final int firstByte = input.read ();
    if (firstByte == -1) {
        return false;
    }
    final int size = CodedInputStream.readRawVarint32 (firstByte, input);
    final InputStream limitedInput = new LimitedInputStream (input, size);
    mergeFrom (limitedInput);
    return true;
}
 
开发者ID:BFergerson,项目名称:Beam,代码行数:12,代码来源:UnknownFieldSet.java


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