crosby.binary.Fileformat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oshpbf-parser Show documentation
Show all versions of oshpbf-parser Show documentation
The PBF-Parser that transfers osh.pbf-files into database Objects.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/fileformat.proto
package crosby.binary;
public final class Fileformat {
private Fileformat() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface BlobOrBuilder extends
// @@protoc_insertion_point(interface_extends:OSMPBF.Blob)
com.google.protobuf.MessageLiteOrBuilder {
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
boolean hasRaw();
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
com.google.protobuf.ByteString getRaw();
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
boolean hasRawSize();
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
int getRawSize();
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
boolean hasZlibData();
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
com.google.protobuf.ByteString getZlibData();
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
boolean hasLzmaData();
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
com.google.protobuf.ByteString getLzmaData();
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated boolean hasOBSOLETEBzip2Data();
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data();
}
/**
* Protobuf type {@code OSMPBF.Blob}
*/
public static final class Blob extends
com.google.protobuf.GeneratedMessageLite implements
// @@protoc_insertion_point(message_implements:OSMPBF.Blob)
BlobOrBuilder {
// Use Blob.newBuilder() to construct.
private Blob(com.google.protobuf.GeneratedMessageLite.Builder builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Blob(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
private static final Blob defaultInstance;
public static Blob getDefaultInstance() {
return defaultInstance;
}
public Blob getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.ByteString unknownFields;
private Blob(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.ByteString.Output unknownFieldsOutput =
com.google.protobuf.ByteString.newOutput();
com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
com.google.protobuf.CodedOutputStream.newInstance(
unknownFieldsOutput);
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFieldsCodedOutput,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
raw_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
rawSize_ = input.readInt32();
break;
}
case 26: {
bitField0_ |= 0x00000004;
zlibData_ = input.readBytes();
break;
}
case 34: {
bitField0_ |= 0x00000008;
lzmaData_ = input.readBytes();
break;
}
case 42: {
bitField0_ |= 0x00000010;
oBSOLETEBzip2Data_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
try {
unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) {
// Should not happen
} finally {
unknownFields = unknownFieldsOutput.toByteString();
}
makeExtensionsImmutable();
}
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Blob parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Blob(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int RAW_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString raw_;
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public boolean hasRaw() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public com.google.protobuf.ByteString getRaw() {
return raw_;
}
public static final int RAW_SIZE_FIELD_NUMBER = 2;
private int rawSize_;
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public boolean hasRawSize() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public int getRawSize() {
return rawSize_;
}
public static final int ZLIB_DATA_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString zlibData_;
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public boolean hasZlibData() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public com.google.protobuf.ByteString getZlibData() {
return zlibData_;
}
public static final int LZMA_DATA_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString lzmaData_;
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public boolean hasLzmaData() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public com.google.protobuf.ByteString getLzmaData() {
return lzmaData_;
}
public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString oBSOLETEBzip2Data_;
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
return oBSOLETEBzip2Data_;
}
private void initFields() {
raw_ = com.google.protobuf.ByteString.EMPTY;
rawSize_ = 0;
zlibData_ = com.google.protobuf.ByteString.EMPTY;
lzmaData_ = com.google.protobuf.ByteString.EMPTY;
oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, raw_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, rawSize_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, zlibData_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBytes(4, lzmaData_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeBytes(5, oBSOLETEBzip2Data_);
}
output.writeRawBytes(unknownFields);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, raw_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, rawSize_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, zlibData_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, lzmaData_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, oBSOLETEBzip2Data_);
}
size += unknownFields.size();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static crosby.binary.Fileformat.Blob parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static crosby.binary.Fileformat.Blob parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static crosby.binary.Fileformat.Blob parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static crosby.binary.Fileformat.Blob parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static crosby.binary.Fileformat.Blob parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static crosby.binary.Fileformat.Blob parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static crosby.binary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static crosby.binary.Fileformat.Blob parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static crosby.binary.Fileformat.Blob parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static crosby.binary.Fileformat.Blob parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(crosby.binary.Fileformat.Blob prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
/**
* Protobuf type {@code OSMPBF.Blob}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
crosby.binary.Fileformat.Blob, Builder>
implements
// @@protoc_insertion_point(builder_implements:OSMPBF.Blob)
crosby.binary.Fileformat.BlobOrBuilder {
// Construct using crosby.binary.Fileformat.Blob.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
raw_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
rawSize_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
zlibData_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
lzmaData_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public crosby.binary.Fileformat.Blob getDefaultInstanceForType() {
return crosby.binary.Fileformat.Blob.getDefaultInstance();
}
public crosby.binary.Fileformat.Blob build() {
crosby.binary.Fileformat.Blob result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public crosby.binary.Fileformat.Blob buildPartial() {
crosby.binary.Fileformat.Blob result = new crosby.binary.Fileformat.Blob(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.raw_ = raw_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.rawSize_ = rawSize_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.zlibData_ = zlibData_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.lzmaData_ = lzmaData_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_;
result.bitField0_ = to_bitField0_;
return result;
}
public Builder mergeFrom(crosby.binary.Fileformat.Blob other) {
if (other == crosby.binary.Fileformat.Blob.getDefaultInstance()) return this;
if (other.hasRaw()) {
setRaw(other.getRaw());
}
if (other.hasRawSize()) {
setRawSize(other.getRawSize());
}
if (other.hasZlibData()) {
setZlibData(other.getZlibData());
}
if (other.hasLzmaData()) {
setLzmaData(other.getLzmaData());
}
if (other.hasOBSOLETEBzip2Data()) {
setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data());
}
setUnknownFields(
getUnknownFields().concat(other.unknownFields));
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
crosby.binary.Fileformat.Blob parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (crosby.binary.Fileformat.Blob) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public boolean hasRaw() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public com.google.protobuf.ByteString getRaw() {
return raw_;
}
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public Builder setRaw(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
raw_ = value;
return this;
}
/**
* optional bytes raw = 1;
*
*
* No compression
*
*/
public Builder clearRaw() {
bitField0_ = (bitField0_ & ~0x00000001);
raw_ = getDefaultInstance().getRaw();
return this;
}
private int rawSize_ ;
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public boolean hasRawSize() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public int getRawSize() {
return rawSize_;
}
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public Builder setRawSize(int value) {
bitField0_ |= 0x00000002;
rawSize_ = value;
return this;
}
/**
* optional int32 raw_size = 2;
*
*
* When compressed, the uncompressed size
*
*/
public Builder clearRawSize() {
bitField0_ = (bitField0_ & ~0x00000002);
rawSize_ = 0;
return this;
}
private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public boolean hasZlibData() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public com.google.protobuf.ByteString getZlibData() {
return zlibData_;
}
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public Builder setZlibData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
zlibData_ = value;
return this;
}
/**
* optional bytes zlib_data = 3;
*
*
* Possible compressed versions of the data.
*
*/
public Builder clearZlibData() {
bitField0_ = (bitField0_ & ~0x00000004);
zlibData_ = getDefaultInstance().getZlibData();
return this;
}
private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public boolean hasLzmaData() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public com.google.protobuf.ByteString getLzmaData() {
return lzmaData_;
}
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public Builder setLzmaData(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
lzmaData_ = value;
return this;
}
/**
* optional bytes lzma_data = 4;
*
*
* PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
*
*/
public Builder clearLzmaData() {
bitField0_ = (bitField0_ & ~0x00000008);
lzmaData_ = getDefaultInstance().getLzmaData();
return this;
}
private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() {
return oBSOLETEBzip2Data_;
}
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
oBSOLETEBzip2Data_ = value;
return this;
}
/**
* optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];
*
*
* Formerly used for bzip2 compressed data. Depreciated in 2010.
*
*/
@java.lang.Deprecated public Builder clearOBSOLETEBzip2Data() {
bitField0_ = (bitField0_ & ~0x00000010);
oBSOLETEBzip2Data_ = getDefaultInstance().getOBSOLETEBzip2Data();
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.Blob)
}
static {
defaultInstance = new Blob(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:OSMPBF.Blob)
}
public interface BlobHeaderOrBuilder extends
// @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader)
com.google.protobuf.MessageLiteOrBuilder {
/**
* required string type = 1;
*/
boolean hasType();
/**
* required string type = 1;
*/
java.lang.String getType();
/**
* required string type = 1;
*/
com.google.protobuf.ByteString
getTypeBytes();
/**
* optional bytes indexdata = 2;
*/
boolean hasIndexdata();
/**
* optional bytes indexdata = 2;
*/
com.google.protobuf.ByteString getIndexdata();
/**
* required int32 datasize = 3;
*/
boolean hasDatasize();
/**
* required int32 datasize = 3;
*/
int getDatasize();
}
/**
* Protobuf type {@code OSMPBF.BlobHeader}
*/
public static final class BlobHeader extends
com.google.protobuf.GeneratedMessageLite implements
// @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader)
BlobHeaderOrBuilder {
// Use BlobHeader.newBuilder() to construct.
private BlobHeader(com.google.protobuf.GeneratedMessageLite.Builder builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private BlobHeader(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;}
private static final BlobHeader defaultInstance;
public static BlobHeader getDefaultInstance() {
return defaultInstance;
}
public BlobHeader getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.ByteString unknownFields;
private BlobHeader(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.ByteString.Output unknownFieldsOutput =
com.google.protobuf.ByteString.newOutput();
com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput =
com.google.protobuf.CodedOutputStream.newInstance(
unknownFieldsOutput);
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFieldsCodedOutput,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
type_ = bs;
break;
}
case 18: {
bitField0_ |= 0x00000002;
indexdata_ = input.readBytes();
break;
}
case 24: {
bitField0_ |= 0x00000004;
datasize_ = input.readInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
try {
unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) {
// Should not happen
} finally {
unknownFields = unknownFieldsOutput.toByteString();
}
makeExtensionsImmutable();
}
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public BlobHeader parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlobHeader(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private java.lang.Object type_;
/**
* required string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
}
}
/**
* required string type = 1;
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INDEXDATA_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString indexdata_;
/**
* optional bytes indexdata = 2;
*/
public boolean hasIndexdata() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes indexdata = 2;
*/
public com.google.protobuf.ByteString getIndexdata() {
return indexdata_;
}
public static final int DATASIZE_FIELD_NUMBER = 3;
private int datasize_;
/**
* required int32 datasize = 3;
*/
public boolean hasDatasize() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* required int32 datasize = 3;
*/
public int getDatasize() {
return datasize_;
}
private void initFields() {
type_ = "";
indexdata_ = com.google.protobuf.ByteString.EMPTY;
datasize_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!hasType()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasDatasize()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, indexdata_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, datasize_);
}
output.writeRawBytes(unknownFields);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, indexdata_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, datasize_);
}
size += unknownFields.size();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static crosby.binary.Fileformat.BlobHeader parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(crosby.binary.Fileformat.BlobHeader prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
/**
* Protobuf type {@code OSMPBF.BlobHeader}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
crosby.binary.Fileformat.BlobHeader, Builder>
implements
// @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader)
crosby.binary.Fileformat.BlobHeaderOrBuilder {
// Construct using crosby.binary.Fileformat.BlobHeader.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
indexdata_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
datasize_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public crosby.binary.Fileformat.BlobHeader getDefaultInstanceForType() {
return crosby.binary.Fileformat.BlobHeader.getDefaultInstance();
}
public crosby.binary.Fileformat.BlobHeader build() {
crosby.binary.Fileformat.BlobHeader result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public crosby.binary.Fileformat.BlobHeader buildPartial() {
crosby.binary.Fileformat.BlobHeader result = new crosby.binary.Fileformat.BlobHeader(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.indexdata_ = indexdata_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.datasize_ = datasize_;
result.bitField0_ = to_bitField0_;
return result;
}
public Builder mergeFrom(crosby.binary.Fileformat.BlobHeader other) {
if (other == crosby.binary.Fileformat.BlobHeader.getDefaultInstance()) return this;
if (other.hasType()) {
bitField0_ |= 0x00000001;
type_ = other.type_;
}
if (other.hasIndexdata()) {
setIndexdata(other.getIndexdata());
}
if (other.hasDatasize()) {
setDatasize(other.getDatasize());
}
setUnknownFields(
getUnknownFields().concat(other.unknownFields));
return this;
}
public final boolean isInitialized() {
if (!hasType()) {
return false;
}
if (!hasDatasize()) {
return false;
}
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
crosby.binary.Fileformat.BlobHeader parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (crosby.binary.Fileformat.BlobHeader) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
* required string type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* required string type = 1;
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
type_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* required string type = 1;
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* required string type = 1;
*/
public Builder setType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
return this;
}
/**
* required string type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = getDefaultInstance().getType();
return this;
}
/**
* required string type = 1;
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
return this;
}
private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes indexdata = 2;
*/
public boolean hasIndexdata() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes indexdata = 2;
*/
public com.google.protobuf.ByteString getIndexdata() {
return indexdata_;
}
/**
* optional bytes indexdata = 2;
*/
public Builder setIndexdata(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
indexdata_ = value;
return this;
}
/**
* optional bytes indexdata = 2;
*/
public Builder clearIndexdata() {
bitField0_ = (bitField0_ & ~0x00000002);
indexdata_ = getDefaultInstance().getIndexdata();
return this;
}
private int datasize_ ;
/**
* required int32 datasize = 3;
*/
public boolean hasDatasize() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* required int32 datasize = 3;
*/
public int getDatasize() {
return datasize_;
}
/**
* required int32 datasize = 3;
*/
public Builder setDatasize(int value) {
bitField0_ |= 0x00000004;
datasize_ = value;
return this;
}
/**
* required int32 datasize = 3;
*/
public Builder clearDatasize() {
bitField0_ = (bitField0_ & ~0x00000004);
datasize_ = 0;
return this;
}
// @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader)
}
static {
defaultInstance = new BlobHeader(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader)
}
static {
}
// @@protoc_insertion_point(outer_class_scope)
}