Changeset 30490 in osm for applications/editors/josm/plugins/pbf/gen/crosby/binary/Fileformat.java
- Timestamp:
- 2014-06-09T18:08:08+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pbf/gen/crosby/binary/Fileformat.java
r26961 r30490 1 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: src/fileformat.proto 2 // source: src/crosby/binary/fileformat.proto 3 3 4 4 package crosby.binary; … … 11 11 public interface BlobOrBuilder 12 12 extends com.google.protobuf.MessageLiteOrBuilder { 13 13 14 14 // optional bytes raw = 1; 15 /** 16 * <code>optional bytes raw = 1;</code> 17 * 18 * <pre> 19 * No compression 20 * </pre> 21 */ 15 22 boolean hasRaw(); 23 /** 24 * <code>optional bytes raw = 1;</code> 25 * 26 * <pre> 27 * No compression 28 * </pre> 29 */ 16 30 com.google.protobuf.ByteString getRaw(); 17 31 18 32 // optional int32 raw_size = 2; 33 /** 34 * <code>optional int32 raw_size = 2;</code> 35 * 36 * <pre> 37 * When compressed, the uncompressed size 38 * </pre> 39 */ 19 40 boolean hasRawSize(); 41 /** 42 * <code>optional int32 raw_size = 2;</code> 43 * 44 * <pre> 45 * When compressed, the uncompressed size 46 * </pre> 47 */ 20 48 int getRawSize(); 21 49 22 50 // optional bytes zlib_data = 3; 51 /** 52 * <code>optional bytes zlib_data = 3;</code> 53 * 54 * <pre> 55 * Possible compressed versions of the data. 56 * </pre> 57 */ 23 58 boolean hasZlibData(); 59 /** 60 * <code>optional bytes zlib_data = 3;</code> 61 * 62 * <pre> 63 * Possible compressed versions of the data. 64 * </pre> 65 */ 24 66 com.google.protobuf.ByteString getZlibData(); 25 67 26 68 // optional bytes lzma_data = 4; 69 /** 70 * <code>optional bytes lzma_data = 4;</code> 71 * 72 * <pre> 73 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 74 * </pre> 75 */ 27 76 boolean hasLzmaData(); 77 /** 78 * <code>optional bytes lzma_data = 4;</code> 79 * 80 * <pre> 81 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 82 * </pre> 83 */ 28 84 com.google.protobuf.ByteString getLzmaData(); 29 85 30 86 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; 87 /** 88 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 89 * 90 * <pre> 91 * Formerly used for bzip2 compressed data. Depreciated in 2010. 92 * </pre> 93 */ 31 94 @java.lang.Deprecated boolean hasOBSOLETEBzip2Data(); 95 /** 96 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 97 * 98 * <pre> 99 * Formerly used for bzip2 compressed data. Depreciated in 2010. 100 * </pre> 101 */ 32 102 @java.lang.Deprecated com.google.protobuf.ByteString getOBSOLETEBzip2Data(); 33 103 } 104 /** 105 * Protobuf type {@code OSMPBF.Blob} 106 */ 34 107 public static final class Blob extends 35 108 com.google.protobuf.GeneratedMessageLite 36 109 implements BlobOrBuilder { 37 110 // Use Blob.newBuilder() to construct. 38 private Blob(Builder builder) { 111 private Blob(com.google.protobuf.GeneratedMessageLite.Builder builder) { 39 112 super(builder); 113 40 114 } 41 115 private Blob(boolean noInit) {} 42 116 43 117 private static final Blob defaultInstance; 44 118 public static Blob getDefaultInstance() { 45 119 return defaultInstance; 46 120 } 47 121 48 122 public Blob getDefaultInstanceForType() { 49 123 return defaultInstance; 50 124 } 51 52 private int bitField0_; 53 // optional bytes raw = 1; 54 public static final int RAW_FIELD_NUMBER = 1; 55 private com.google.protobuf.ByteString raw_; 56 public boolean hasRaw() { 57 return ((bitField0_ & 0x00000001) == 0x00000001); 58 } 59 public com.google.protobuf.ByteString getRaw() { 60 return raw_; 61 } 62 63 // optional int32 raw_size = 2; 64 public static final int RAW_SIZE_FIELD_NUMBER = 2; 65 private int rawSize_; 66 public boolean hasRawSize() { 67 return ((bitField0_ & 0x00000002) == 0x00000002); 68 } 69 public int getRawSize() { 70 return rawSize_; 71 } 72 73 // optional bytes zlib_data = 3; 74 public static final int ZLIB_DATA_FIELD_NUMBER = 3; 75 private com.google.protobuf.ByteString zlibData_; 76 public boolean hasZlibData() { 77 return ((bitField0_ & 0x00000004) == 0x00000004); 78 } 79 public com.google.protobuf.ByteString getZlibData() { 80 return zlibData_; 81 } 82 83 // optional bytes lzma_data = 4; 84 public static final int LZMA_DATA_FIELD_NUMBER = 4; 85 private com.google.protobuf.ByteString lzmaData_; 86 public boolean hasLzmaData() { 87 return ((bitField0_ & 0x00000008) == 0x00000008); 88 } 89 public com.google.protobuf.ByteString getLzmaData() { 90 return lzmaData_; 91 } 92 93 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; 94 public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5; 95 private com.google.protobuf.ByteString oBSOLETEBzip2Data_; 96 @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() { 97 return ((bitField0_ & 0x00000010) == 0x00000010); 98 } 99 @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() { 100 return oBSOLETEBzip2Data_; 101 } 102 103 private void initFields() { 104 raw_ = com.google.protobuf.ByteString.EMPTY; 105 rawSize_ = 0; 106 zlibData_ = com.google.protobuf.ByteString.EMPTY; 107 lzmaData_ = com.google.protobuf.ByteString.EMPTY; 108 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 109 } 110 private byte memoizedIsInitialized = -1; 111 public final boolean isInitialized() { 112 byte isInitialized = memoizedIsInitialized; 113 if (isInitialized != -1) return isInitialized == 1; 114 115 memoizedIsInitialized = 1; 116 return true; 117 } 118 119 public void writeTo(com.google.protobuf.CodedOutputStream output) 120 throws java.io.IOException { 121 getSerializedSize(); 122 if (((bitField0_ & 0x00000001) == 0x00000001)) { 123 output.writeBytes(1, raw_); 124 } 125 if (((bitField0_ & 0x00000002) == 0x00000002)) { 126 output.writeInt32(2, rawSize_); 127 } 128 if (((bitField0_ & 0x00000004) == 0x00000004)) { 129 output.writeBytes(3, zlibData_); 130 } 131 if (((bitField0_ & 0x00000008) == 0x00000008)) { 132 output.writeBytes(4, lzmaData_); 133 } 134 if (((bitField0_ & 0x00000010) == 0x00000010)) { 135 output.writeBytes(5, oBSOLETEBzip2Data_); 136 } 137 } 138 139 private int memoizedSerializedSize = -1; 140 public int getSerializedSize() { 141 int size = memoizedSerializedSize; 142 if (size != -1) return size; 143 144 size = 0; 145 if (((bitField0_ & 0x00000001) == 0x00000001)) { 146 size += com.google.protobuf.CodedOutputStream 147 .computeBytesSize(1, raw_); 148 } 149 if (((bitField0_ & 0x00000002) == 0x00000002)) { 150 size += com.google.protobuf.CodedOutputStream 151 .computeInt32Size(2, rawSize_); 152 } 153 if (((bitField0_ & 0x00000004) == 0x00000004)) { 154 size += com.google.protobuf.CodedOutputStream 155 .computeBytesSize(3, zlibData_); 156 } 157 if (((bitField0_ & 0x00000008) == 0x00000008)) { 158 size += com.google.protobuf.CodedOutputStream 159 .computeBytesSize(4, lzmaData_); 160 } 161 if (((bitField0_ & 0x00000010) == 0x00000010)) { 162 size += com.google.protobuf.CodedOutputStream 163 .computeBytesSize(5, oBSOLETEBzip2Data_); 164 } 165 memoizedSerializedSize = size; 166 return size; 167 } 168 169 private static final long serialVersionUID = 0L; 170 @java.lang.Override 171 protected java.lang.Object writeReplace() 172 throws java.io.ObjectStreamException { 173 return super.writeReplace(); 174 } 175 176 public static crosby.binary.Fileformat.Blob parseFrom( 177 com.google.protobuf.ByteString data) 178 throws com.google.protobuf.InvalidProtocolBufferException { 179 return newBuilder().mergeFrom(data).buildParsed(); 180 } 181 public static crosby.binary.Fileformat.Blob parseFrom( 182 com.google.protobuf.ByteString data, 125 126 private Blob( 127 com.google.protobuf.CodedInputStream input, 183 128 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 184 129 throws com.google.protobuf.InvalidProtocolBufferException { 185 return newBuilder().mergeFrom(data, extensionRegistry) 186 .buildParsed(); 187 } 188 public static crosby.binary.Fileformat.Blob parseFrom(byte[] data) 189 throws com.google.protobuf.InvalidProtocolBufferException { 190 return newBuilder().mergeFrom(data).buildParsed(); 191 } 192 public static crosby.binary.Fileformat.Blob parseFrom( 193 byte[] data, 194 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 195 throws com.google.protobuf.InvalidProtocolBufferException { 196 return newBuilder().mergeFrom(data, extensionRegistry) 197 .buildParsed(); 198 } 199 public static crosby.binary.Fileformat.Blob parseFrom(java.io.InputStream input) 200 throws java.io.IOException { 201 return newBuilder().mergeFrom(input).buildParsed(); 202 } 203 public static crosby.binary.Fileformat.Blob parseFrom( 204 java.io.InputStream input, 205 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 206 throws java.io.IOException { 207 return newBuilder().mergeFrom(input, extensionRegistry) 208 .buildParsed(); 209 } 210 public static crosby.binary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input) 211 throws java.io.IOException { 212 Builder builder = newBuilder(); 213 if (builder.mergeDelimitedFrom(input)) { 214 return builder.buildParsed(); 215 } else { 216 return null; 217 } 218 } 219 public static crosby.binary.Fileformat.Blob parseDelimitedFrom( 220 java.io.InputStream input, 221 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 222 throws java.io.IOException { 223 Builder builder = newBuilder(); 224 if (builder.mergeDelimitedFrom(input, extensionRegistry)) { 225 return builder.buildParsed(); 226 } else { 227 return null; 228 } 229 } 230 public static crosby.binary.Fileformat.Blob parseFrom( 231 com.google.protobuf.CodedInputStream input) 232 throws java.io.IOException { 233 return newBuilder().mergeFrom(input).buildParsed(); 234 } 235 public static crosby.binary.Fileformat.Blob parseFrom( 236 com.google.protobuf.CodedInputStream input, 237 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 238 throws java.io.IOException { 239 return newBuilder().mergeFrom(input, extensionRegistry) 240 .buildParsed(); 241 } 242 243 public static Builder newBuilder() { return Builder.create(); } 244 public Builder newBuilderForType() { return newBuilder(); } 245 public static Builder newBuilder(crosby.binary.Fileformat.Blob prototype) { 246 return newBuilder().mergeFrom(prototype); 247 } 248 public Builder toBuilder() { return newBuilder(this); } 249 250 public static final class Builder extends 251 com.google.protobuf.GeneratedMessageLite.Builder< 252 crosby.binary.Fileformat.Blob, Builder> 253 implements crosby.binary.Fileformat.BlobOrBuilder { 254 // Construct using crosby.binary.Fileformat.Blob.newBuilder() 255 private Builder() { 256 maybeForceBuilderInitialization(); 257 } 258 259 private void maybeForceBuilderInitialization() { 260 } 261 private static Builder create() { 262 return new Builder(); 263 } 264 265 public Builder clear() { 266 super.clear(); 267 raw_ = com.google.protobuf.ByteString.EMPTY; 268 bitField0_ = (bitField0_ & ~0x00000001); 269 rawSize_ = 0; 270 bitField0_ = (bitField0_ & ~0x00000002); 271 zlibData_ = com.google.protobuf.ByteString.EMPTY; 272 bitField0_ = (bitField0_ & ~0x00000004); 273 lzmaData_ = com.google.protobuf.ByteString.EMPTY; 274 bitField0_ = (bitField0_ & ~0x00000008); 275 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 276 bitField0_ = (bitField0_ & ~0x00000010); 277 return this; 278 } 279 280 public Builder clone() { 281 return create().mergeFrom(buildPartial()); 282 } 283 284 public crosby.binary.Fileformat.Blob getDefaultInstanceForType() { 285 return crosby.binary.Fileformat.Blob.getDefaultInstance(); 286 } 287 288 public crosby.binary.Fileformat.Blob build() { 289 crosby.binary.Fileformat.Blob result = buildPartial(); 290 if (!result.isInitialized()) { 291 throw newUninitializedMessageException(result); 292 } 293 return result; 294 } 295 296 private crosby.binary.Fileformat.Blob buildParsed() 297 throws com.google.protobuf.InvalidProtocolBufferException { 298 crosby.binary.Fileformat.Blob result = buildPartial(); 299 if (!result.isInitialized()) { 300 throw newUninitializedMessageException( 301 result).asInvalidProtocolBufferException(); 302 } 303 return result; 304 } 305 306 public crosby.binary.Fileformat.Blob buildPartial() { 307 crosby.binary.Fileformat.Blob result = new crosby.binary.Fileformat.Blob(this); 308 int from_bitField0_ = bitField0_; 309 int to_bitField0_ = 0; 310 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 311 to_bitField0_ |= 0x00000001; 312 } 313 result.raw_ = raw_; 314 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 315 to_bitField0_ |= 0x00000002; 316 } 317 result.rawSize_ = rawSize_; 318 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 319 to_bitField0_ |= 0x00000004; 320 } 321 result.zlibData_ = zlibData_; 322 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 323 to_bitField0_ |= 0x00000008; 324 } 325 result.lzmaData_ = lzmaData_; 326 if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 327 to_bitField0_ |= 0x00000010; 328 } 329 result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_; 330 result.bitField0_ = to_bitField0_; 331 return result; 332 } 333 334 public Builder mergeFrom(crosby.binary.Fileformat.Blob other) { 335 if (other == crosby.binary.Fileformat.Blob.getDefaultInstance()) return this; 336 if (other.hasRaw()) { 337 setRaw(other.getRaw()); 338 } 339 if (other.hasRawSize()) { 340 setRawSize(other.getRawSize()); 341 } 342 if (other.hasZlibData()) { 343 setZlibData(other.getZlibData()); 344 } 345 if (other.hasLzmaData()) { 346 setLzmaData(other.getLzmaData()); 347 } 348 if (other.hasOBSOLETEBzip2Data()) { 349 setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data()); 350 } 351 return this; 352 } 353 354 public final boolean isInitialized() { 355 return true; 356 } 357 358 public Builder mergeFrom( 359 com.google.protobuf.CodedInputStream input, 360 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 361 throws java.io.IOException { 362 while (true) { 130 initFields(); 131 int mutable_bitField0_ = 0; 132 try { 133 boolean done = false; 134 while (!done) { 363 135 int tag = input.readTag(); 364 136 switch (tag) { 365 137 case 0: 366 367 return this;138 done = true; 139 break; 368 140 default: { 369 if (!parseUnknownField(input, extensionRegistry, tag)) {370 371 return this;141 if (!parseUnknownField(input, 142 extensionRegistry, tag)) { 143 done = true; 372 144 } 373 145 break; … … 400 172 } 401 173 } 402 } 403 174 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 175 throw e.setUnfinishedMessage(this); 176 } catch (java.io.IOException e) { 177 throw new com.google.protobuf.InvalidProtocolBufferException( 178 e.getMessage()).setUnfinishedMessage(this); 179 } finally { 180 makeExtensionsImmutable(); 181 } 182 } 183 public static com.google.protobuf.Parser<Blob> PARSER = 184 new com.google.protobuf.AbstractParser<Blob>() { 185 public Blob parsePartialFrom( 186 com.google.protobuf.CodedInputStream input, 187 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 188 throws com.google.protobuf.InvalidProtocolBufferException { 189 return new Blob(input, extensionRegistry); 190 } 191 }; 192 193 @java.lang.Override 194 public com.google.protobuf.Parser<Blob> getParserForType() { 195 return PARSER; 196 } 197 198 private int bitField0_; 199 // optional bytes raw = 1; 200 public static final int RAW_FIELD_NUMBER = 1; 201 private com.google.protobuf.ByteString raw_; 202 /** 203 * <code>optional bytes raw = 1;</code> 204 * 205 * <pre> 206 * No compression 207 * </pre> 208 */ 209 public boolean hasRaw() { 210 return ((bitField0_ & 0x00000001) == 0x00000001); 211 } 212 /** 213 * <code>optional bytes raw = 1;</code> 214 * 215 * <pre> 216 * No compression 217 * </pre> 218 */ 219 public com.google.protobuf.ByteString getRaw() { 220 return raw_; 221 } 222 223 // optional int32 raw_size = 2; 224 public static final int RAW_SIZE_FIELD_NUMBER = 2; 225 private int rawSize_; 226 /** 227 * <code>optional int32 raw_size = 2;</code> 228 * 229 * <pre> 230 * When compressed, the uncompressed size 231 * </pre> 232 */ 233 public boolean hasRawSize() { 234 return ((bitField0_ & 0x00000002) == 0x00000002); 235 } 236 /** 237 * <code>optional int32 raw_size = 2;</code> 238 * 239 * <pre> 240 * When compressed, the uncompressed size 241 * </pre> 242 */ 243 public int getRawSize() { 244 return rawSize_; 245 } 246 247 // optional bytes zlib_data = 3; 248 public static final int ZLIB_DATA_FIELD_NUMBER = 3; 249 private com.google.protobuf.ByteString zlibData_; 250 /** 251 * <code>optional bytes zlib_data = 3;</code> 252 * 253 * <pre> 254 * Possible compressed versions of the data. 255 * </pre> 256 */ 257 public boolean hasZlibData() { 258 return ((bitField0_ & 0x00000004) == 0x00000004); 259 } 260 /** 261 * <code>optional bytes zlib_data = 3;</code> 262 * 263 * <pre> 264 * Possible compressed versions of the data. 265 * </pre> 266 */ 267 public com.google.protobuf.ByteString getZlibData() { 268 return zlibData_; 269 } 270 271 // optional bytes lzma_data = 4; 272 public static final int LZMA_DATA_FIELD_NUMBER = 4; 273 private com.google.protobuf.ByteString lzmaData_; 274 /** 275 * <code>optional bytes lzma_data = 4;</code> 276 * 277 * <pre> 278 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 279 * </pre> 280 */ 281 public boolean hasLzmaData() { 282 return ((bitField0_ & 0x00000008) == 0x00000008); 283 } 284 /** 285 * <code>optional bytes lzma_data = 4;</code> 286 * 287 * <pre> 288 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 289 * </pre> 290 */ 291 public com.google.protobuf.ByteString getLzmaData() { 292 return lzmaData_; 293 } 294 295 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; 296 public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5; 297 private com.google.protobuf.ByteString oBSOLETEBzip2Data_; 298 /** 299 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 300 * 301 * <pre> 302 * Formerly used for bzip2 compressed data. Depreciated in 2010. 303 * </pre> 304 */ 305 @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() { 306 return ((bitField0_ & 0x00000010) == 0x00000010); 307 } 308 /** 309 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 310 * 311 * <pre> 312 * Formerly used for bzip2 compressed data. Depreciated in 2010. 313 * </pre> 314 */ 315 @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() { 316 return oBSOLETEBzip2Data_; 317 } 318 319 private void initFields() { 320 raw_ = com.google.protobuf.ByteString.EMPTY; 321 rawSize_ = 0; 322 zlibData_ = com.google.protobuf.ByteString.EMPTY; 323 lzmaData_ = com.google.protobuf.ByteString.EMPTY; 324 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 325 } 326 private byte memoizedIsInitialized = -1; 327 public final boolean isInitialized() { 328 byte isInitialized = memoizedIsInitialized; 329 if (isInitialized != -1) return isInitialized == 1; 330 331 memoizedIsInitialized = 1; 332 return true; 333 } 334 335 public void writeTo(com.google.protobuf.CodedOutputStream output) 336 throws java.io.IOException { 337 getSerializedSize(); 338 if (((bitField0_ & 0x00000001) == 0x00000001)) { 339 output.writeBytes(1, raw_); 340 } 341 if (((bitField0_ & 0x00000002) == 0x00000002)) { 342 output.writeInt32(2, rawSize_); 343 } 344 if (((bitField0_ & 0x00000004) == 0x00000004)) { 345 output.writeBytes(3, zlibData_); 346 } 347 if (((bitField0_ & 0x00000008) == 0x00000008)) { 348 output.writeBytes(4, lzmaData_); 349 } 350 if (((bitField0_ & 0x00000010) == 0x00000010)) { 351 output.writeBytes(5, oBSOLETEBzip2Data_); 352 } 353 } 354 355 private int memoizedSerializedSize = -1; 356 public int getSerializedSize() { 357 int size = memoizedSerializedSize; 358 if (size != -1) return size; 359 360 size = 0; 361 if (((bitField0_ & 0x00000001) == 0x00000001)) { 362 size += com.google.protobuf.CodedOutputStream 363 .computeBytesSize(1, raw_); 364 } 365 if (((bitField0_ & 0x00000002) == 0x00000002)) { 366 size += com.google.protobuf.CodedOutputStream 367 .computeInt32Size(2, rawSize_); 368 } 369 if (((bitField0_ & 0x00000004) == 0x00000004)) { 370 size += com.google.protobuf.CodedOutputStream 371 .computeBytesSize(3, zlibData_); 372 } 373 if (((bitField0_ & 0x00000008) == 0x00000008)) { 374 size += com.google.protobuf.CodedOutputStream 375 .computeBytesSize(4, lzmaData_); 376 } 377 if (((bitField0_ & 0x00000010) == 0x00000010)) { 378 size += com.google.protobuf.CodedOutputStream 379 .computeBytesSize(5, oBSOLETEBzip2Data_); 380 } 381 memoizedSerializedSize = size; 382 return size; 383 } 384 385 private static final long serialVersionUID = 0L; 386 @java.lang.Override 387 protected java.lang.Object writeReplace() 388 throws java.io.ObjectStreamException { 389 return super.writeReplace(); 390 } 391 392 public static crosby.binary.Fileformat.Blob parseFrom( 393 com.google.protobuf.ByteString data) 394 throws com.google.protobuf.InvalidProtocolBufferException { 395 return PARSER.parseFrom(data); 396 } 397 public static crosby.binary.Fileformat.Blob parseFrom( 398 com.google.protobuf.ByteString data, 399 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 400 throws com.google.protobuf.InvalidProtocolBufferException { 401 return PARSER.parseFrom(data, extensionRegistry); 402 } 403 public static crosby.binary.Fileformat.Blob parseFrom(byte[] data) 404 throws com.google.protobuf.InvalidProtocolBufferException { 405 return PARSER.parseFrom(data); 406 } 407 public static crosby.binary.Fileformat.Blob parseFrom( 408 byte[] data, 409 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 410 throws com.google.protobuf.InvalidProtocolBufferException { 411 return PARSER.parseFrom(data, extensionRegistry); 412 } 413 public static crosby.binary.Fileformat.Blob parseFrom(java.io.InputStream input) 414 throws java.io.IOException { 415 return PARSER.parseFrom(input); 416 } 417 public static crosby.binary.Fileformat.Blob parseFrom( 418 java.io.InputStream input, 419 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 420 throws java.io.IOException { 421 return PARSER.parseFrom(input, extensionRegistry); 422 } 423 public static crosby.binary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input) 424 throws java.io.IOException { 425 return PARSER.parseDelimitedFrom(input); 426 } 427 public static crosby.binary.Fileformat.Blob parseDelimitedFrom( 428 java.io.InputStream input, 429 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 430 throws java.io.IOException { 431 return PARSER.parseDelimitedFrom(input, extensionRegistry); 432 } 433 public static crosby.binary.Fileformat.Blob parseFrom( 434 com.google.protobuf.CodedInputStream input) 435 throws java.io.IOException { 436 return PARSER.parseFrom(input); 437 } 438 public static crosby.binary.Fileformat.Blob parseFrom( 439 com.google.protobuf.CodedInputStream input, 440 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 441 throws java.io.IOException { 442 return PARSER.parseFrom(input, extensionRegistry); 443 } 444 445 public static Builder newBuilder() { return Builder.create(); } 446 public Builder newBuilderForType() { return newBuilder(); } 447 public static Builder newBuilder(crosby.binary.Fileformat.Blob prototype) { 448 return newBuilder().mergeFrom(prototype); 449 } 450 public Builder toBuilder() { return newBuilder(this); } 451 452 /** 453 * Protobuf type {@code OSMPBF.Blob} 454 */ 455 public static final class Builder extends 456 com.google.protobuf.GeneratedMessageLite.Builder< 457 crosby.binary.Fileformat.Blob, Builder> 458 implements crosby.binary.Fileformat.BlobOrBuilder { 459 // Construct using crosby.binary.Fileformat.Blob.newBuilder() 460 private Builder() { 461 maybeForceBuilderInitialization(); 462 } 463 464 private void maybeForceBuilderInitialization() { 465 } 466 private static Builder create() { 467 return new Builder(); 468 } 469 470 public Builder clear() { 471 super.clear(); 472 raw_ = com.google.protobuf.ByteString.EMPTY; 473 bitField0_ = (bitField0_ & ~0x00000001); 474 rawSize_ = 0; 475 bitField0_ = (bitField0_ & ~0x00000002); 476 zlibData_ = com.google.protobuf.ByteString.EMPTY; 477 bitField0_ = (bitField0_ & ~0x00000004); 478 lzmaData_ = com.google.protobuf.ByteString.EMPTY; 479 bitField0_ = (bitField0_ & ~0x00000008); 480 oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 481 bitField0_ = (bitField0_ & ~0x00000010); 482 return this; 483 } 484 485 public Builder clone() { 486 return create().mergeFrom(buildPartial()); 487 } 488 489 public crosby.binary.Fileformat.Blob getDefaultInstanceForType() { 490 return crosby.binary.Fileformat.Blob.getDefaultInstance(); 491 } 492 493 public crosby.binary.Fileformat.Blob build() { 494 crosby.binary.Fileformat.Blob result = buildPartial(); 495 if (!result.isInitialized()) { 496 throw newUninitializedMessageException(result); 497 } 498 return result; 499 } 500 501 public crosby.binary.Fileformat.Blob buildPartial() { 502 crosby.binary.Fileformat.Blob result = new crosby.binary.Fileformat.Blob(this); 503 int from_bitField0_ = bitField0_; 504 int to_bitField0_ = 0; 505 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 506 to_bitField0_ |= 0x00000001; 507 } 508 result.raw_ = raw_; 509 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 510 to_bitField0_ |= 0x00000002; 511 } 512 result.rawSize_ = rawSize_; 513 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 514 to_bitField0_ |= 0x00000004; 515 } 516 result.zlibData_ = zlibData_; 517 if (((from_bitField0_ & 0x00000008) == 0x00000008)) { 518 to_bitField0_ |= 0x00000008; 519 } 520 result.lzmaData_ = lzmaData_; 521 if (((from_bitField0_ & 0x00000010) == 0x00000010)) { 522 to_bitField0_ |= 0x00000010; 523 } 524 result.oBSOLETEBzip2Data_ = oBSOLETEBzip2Data_; 525 result.bitField0_ = to_bitField0_; 526 return result; 527 } 528 529 public Builder mergeFrom(crosby.binary.Fileformat.Blob other) { 530 if (other == crosby.binary.Fileformat.Blob.getDefaultInstance()) return this; 531 if (other.hasRaw()) { 532 setRaw(other.getRaw()); 533 } 534 if (other.hasRawSize()) { 535 setRawSize(other.getRawSize()); 536 } 537 if (other.hasZlibData()) { 538 setZlibData(other.getZlibData()); 539 } 540 if (other.hasLzmaData()) { 541 setLzmaData(other.getLzmaData()); 542 } 543 if (other.hasOBSOLETEBzip2Data()) { 544 setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data()); 545 } 546 return this; 547 } 548 549 public final boolean isInitialized() { 550 return true; 551 } 552 553 public Builder mergeFrom( 554 com.google.protobuf.CodedInputStream input, 555 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 556 throws java.io.IOException { 557 crosby.binary.Fileformat.Blob parsedMessage = null; 558 try { 559 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 560 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 561 parsedMessage = (crosby.binary.Fileformat.Blob) e.getUnfinishedMessage(); 562 throw e; 563 } finally { 564 if (parsedMessage != null) { 565 mergeFrom(parsedMessage); 566 } 567 } 568 return this; 569 } 404 570 private int bitField0_; 405 571 406 572 // optional bytes raw = 1; 407 573 private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY; 574 /** 575 * <code>optional bytes raw = 1;</code> 576 * 577 * <pre> 578 * No compression 579 * </pre> 580 */ 408 581 public boolean hasRaw() { 409 582 return ((bitField0_ & 0x00000001) == 0x00000001); 410 583 } 584 /** 585 * <code>optional bytes raw = 1;</code> 586 * 587 * <pre> 588 * No compression 589 * </pre> 590 */ 411 591 public com.google.protobuf.ByteString getRaw() { 412 592 return raw_; 413 593 } 594 /** 595 * <code>optional bytes raw = 1;</code> 596 * 597 * <pre> 598 * No compression 599 * </pre> 600 */ 414 601 public Builder setRaw(com.google.protobuf.ByteString value) { 415 602 if (value == null) { … … 421 608 return this; 422 609 } 610 /** 611 * <code>optional bytes raw = 1;</code> 612 * 613 * <pre> 614 * No compression 615 * </pre> 616 */ 423 617 public Builder clearRaw() { 424 618 bitField0_ = (bitField0_ & ~0x00000001); … … 427 621 return this; 428 622 } 429 623 430 624 // optional int32 raw_size = 2; 431 625 private int rawSize_ ; 626 /** 627 * <code>optional int32 raw_size = 2;</code> 628 * 629 * <pre> 630 * When compressed, the uncompressed size 631 * </pre> 632 */ 432 633 public boolean hasRawSize() { 433 634 return ((bitField0_ & 0x00000002) == 0x00000002); 434 635 } 636 /** 637 * <code>optional int32 raw_size = 2;</code> 638 * 639 * <pre> 640 * When compressed, the uncompressed size 641 * </pre> 642 */ 435 643 public int getRawSize() { 436 644 return rawSize_; 437 645 } 646 /** 647 * <code>optional int32 raw_size = 2;</code> 648 * 649 * <pre> 650 * When compressed, the uncompressed size 651 * </pre> 652 */ 438 653 public Builder setRawSize(int value) { 439 654 bitField0_ |= 0x00000002; … … 442 657 return this; 443 658 } 659 /** 660 * <code>optional int32 raw_size = 2;</code> 661 * 662 * <pre> 663 * When compressed, the uncompressed size 664 * </pre> 665 */ 444 666 public Builder clearRawSize() { 445 667 bitField0_ = (bitField0_ & ~0x00000002); … … 448 670 return this; 449 671 } 450 672 451 673 // optional bytes zlib_data = 3; 452 674 private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY; 675 /** 676 * <code>optional bytes zlib_data = 3;</code> 677 * 678 * <pre> 679 * Possible compressed versions of the data. 680 * </pre> 681 */ 453 682 public boolean hasZlibData() { 454 683 return ((bitField0_ & 0x00000004) == 0x00000004); 455 684 } 685 /** 686 * <code>optional bytes zlib_data = 3;</code> 687 * 688 * <pre> 689 * Possible compressed versions of the data. 690 * </pre> 691 */ 456 692 public com.google.protobuf.ByteString getZlibData() { 457 693 return zlibData_; 458 694 } 695 /** 696 * <code>optional bytes zlib_data = 3;</code> 697 * 698 * <pre> 699 * Possible compressed versions of the data. 700 * </pre> 701 */ 459 702 public Builder setZlibData(com.google.protobuf.ByteString value) { 460 703 if (value == null) { … … 466 709 return this; 467 710 } 711 /** 712 * <code>optional bytes zlib_data = 3;</code> 713 * 714 * <pre> 715 * Possible compressed versions of the data. 716 * </pre> 717 */ 468 718 public Builder clearZlibData() { 469 719 bitField0_ = (bitField0_ & ~0x00000004); … … 472 722 return this; 473 723 } 474 724 475 725 // optional bytes lzma_data = 4; 476 726 private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY; 727 /** 728 * <code>optional bytes lzma_data = 4;</code> 729 * 730 * <pre> 731 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 732 * </pre> 733 */ 477 734 public boolean hasLzmaData() { 478 735 return ((bitField0_ & 0x00000008) == 0x00000008); 479 736 } 737 /** 738 * <code>optional bytes lzma_data = 4;</code> 739 * 740 * <pre> 741 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 742 * </pre> 743 */ 480 744 public com.google.protobuf.ByteString getLzmaData() { 481 745 return lzmaData_; 482 746 } 747 /** 748 * <code>optional bytes lzma_data = 4;</code> 749 * 750 * <pre> 751 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 752 * </pre> 753 */ 483 754 public Builder setLzmaData(com.google.protobuf.ByteString value) { 484 755 if (value == null) { … … 490 761 return this; 491 762 } 763 /** 764 * <code>optional bytes lzma_data = 4;</code> 765 * 766 * <pre> 767 * PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED. 768 * </pre> 769 */ 492 770 public Builder clearLzmaData() { 493 771 bitField0_ = (bitField0_ & ~0x00000008); … … 496 774 return this; 497 775 } 498 776 499 777 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true]; 500 778 private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 779 /** 780 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 781 * 782 * <pre> 783 * Formerly used for bzip2 compressed data. Depreciated in 2010. 784 * </pre> 785 */ 501 786 @java.lang.Deprecated public boolean hasOBSOLETEBzip2Data() { 502 787 return ((bitField0_ & 0x00000010) == 0x00000010); 503 788 } 789 /** 790 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 791 * 792 * <pre> 793 * Formerly used for bzip2 compressed data. Depreciated in 2010. 794 * </pre> 795 */ 504 796 @java.lang.Deprecated public com.google.protobuf.ByteString getOBSOLETEBzip2Data() { 505 797 return oBSOLETEBzip2Data_; 506 798 } 799 /** 800 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 801 * 802 * <pre> 803 * Formerly used for bzip2 compressed data. Depreciated in 2010. 804 * </pre> 805 */ 507 806 @java.lang.Deprecated public Builder setOBSOLETEBzip2Data(com.google.protobuf.ByteString value) { 508 807 if (value == null) { … … 514 813 return this; 515 814 } 815 /** 816 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> 817 * 818 * <pre> 819 * Formerly used for bzip2 compressed data. Depreciated in 2010. 820 * </pre> 821 */ 516 822 @java.lang.Deprecated public Builder clearOBSOLETEBzip2Data() { 517 823 bitField0_ = (bitField0_ & ~0x00000010); … … 520 826 return this; 521 827 } 522 828 523 829 // @@protoc_insertion_point(builder_scope:OSMPBF.Blob) 524 830 } 525 831 526 832 static { 527 833 defaultInstance = new Blob(true); 528 834 defaultInstance.initFields(); 529 835 } 530 836 531 837 // @@protoc_insertion_point(class_scope:OSMPBF.Blob) 532 838 } 533 839 534 840 public interface BlobHeaderOrBuilder 535 841 extends com.google.protobuf.MessageLiteOrBuilder { 536 842 537 843 // required string type = 1; 844 /** 845 * <code>required string type = 1;</code> 846 */ 538 847 boolean hasType(); 539 String getType(); 540 848 /** 849 * <code>required string type = 1;</code> 850 */ 851 java.lang.String getType(); 852 /** 853 * <code>required string type = 1;</code> 854 */ 855 com.google.protobuf.ByteString 856 getTypeBytes(); 857 541 858 // optional bytes indexdata = 2; 859 /** 860 * <code>optional bytes indexdata = 2;</code> 861 */ 542 862 boolean hasIndexdata(); 863 /** 864 * <code>optional bytes indexdata = 2;</code> 865 */ 543 866 com.google.protobuf.ByteString getIndexdata(); 544 867 545 868 // required int32 datasize = 3; 869 /** 870 * <code>required int32 datasize = 3;</code> 871 */ 546 872 boolean hasDatasize(); 873 /** 874 * <code>required int32 datasize = 3;</code> 875 */ 547 876 int getDatasize(); 548 877 } 878 /** 879 * Protobuf type {@code OSMPBF.BlobHeader} 880 */ 549 881 public static final class BlobHeader extends 550 882 com.google.protobuf.GeneratedMessageLite 551 883 implements BlobHeaderOrBuilder { 552 884 // Use BlobHeader.newBuilder() to construct. 553 private BlobHeader(Builder builder) { 885 private BlobHeader(com.google.protobuf.GeneratedMessageLite.Builder builder) { 554 886 super(builder); 887 555 888 } 556 889 private BlobHeader(boolean noInit) {} 557 890 558 891 private static final BlobHeader defaultInstance; 559 892 public static BlobHeader getDefaultInstance() { 560 893 return defaultInstance; 561 894 } 562 895 563 896 public BlobHeader getDefaultInstanceForType() { 564 897 return defaultInstance; 565 898 } 566 567 private int bitField0_; 568 // required string type = 1; 569 public static final int TYPE_FIELD_NUMBER = 1; 570 private java.lang.Object type_; 571 public boolean hasType() { 572 return ((bitField0_ & 0x00000001) == 0x00000001); 573 } 574 public String getType() { 575 java.lang.Object ref = type_; 576 if (ref instanceof String) { 577 return (String) ref; 578 } else { 579 com.google.protobuf.ByteString bs = 580 (com.google.protobuf.ByteString) ref; 581 String s = bs.toStringUtf8(); 582 if (com.google.protobuf.Internal.isValidUtf8(bs)) { 583 type_ = s; 584 } 585 return s; 586 } 587 } 588 private com.google.protobuf.ByteString getTypeBytes() { 589 java.lang.Object ref = type_; 590 if (ref instanceof String) { 591 com.google.protobuf.ByteString b = 592 com.google.protobuf.ByteString.copyFromUtf8((String) ref); 593 type_ = b; 594 return b; 595 } else { 596 return (com.google.protobuf.ByteString) ref; 597 } 598 } 599 600 // optional bytes indexdata = 2; 601 public static final int INDEXDATA_FIELD_NUMBER = 2; 602 private com.google.protobuf.ByteString indexdata_; 603 public boolean hasIndexdata() { 604 return ((bitField0_ & 0x00000002) == 0x00000002); 605 } 606 public com.google.protobuf.ByteString getIndexdata() { 607 return indexdata_; 608 } 609 610 // required int32 datasize = 3; 611 public static final int DATASIZE_FIELD_NUMBER = 3; 612 private int datasize_; 613 public boolean hasDatasize() { 614 return ((bitField0_ & 0x00000004) == 0x00000004); 615 } 616 public int getDatasize() { 617 return datasize_; 618 } 619 620 private void initFields() { 621 type_ = ""; 622 indexdata_ = com.google.protobuf.ByteString.EMPTY; 623 datasize_ = 0; 624 } 625 private byte memoizedIsInitialized = -1; 626 public final boolean isInitialized() { 627 byte isInitialized = memoizedIsInitialized; 628 if (isInitialized != -1) return isInitialized == 1; 629 630 if (!hasType()) { 631 memoizedIsInitialized = 0; 632 return false; 633 } 634 if (!hasDatasize()) { 635 memoizedIsInitialized = 0; 636 return false; 637 } 638 memoizedIsInitialized = 1; 639 return true; 640 } 641 642 public void writeTo(com.google.protobuf.CodedOutputStream output) 643 throws java.io.IOException { 644 getSerializedSize(); 645 if (((bitField0_ & 0x00000001) == 0x00000001)) { 646 output.writeBytes(1, getTypeBytes()); 647 } 648 if (((bitField0_ & 0x00000002) == 0x00000002)) { 649 output.writeBytes(2, indexdata_); 650 } 651 if (((bitField0_ & 0x00000004) == 0x00000004)) { 652 output.writeInt32(3, datasize_); 653 } 654 } 655 656 private int memoizedSerializedSize = -1; 657 public int getSerializedSize() { 658 int size = memoizedSerializedSize; 659 if (size != -1) return size; 660 661 size = 0; 662 if (((bitField0_ & 0x00000001) == 0x00000001)) { 663 size += com.google.protobuf.CodedOutputStream 664 .computeBytesSize(1, getTypeBytes()); 665 } 666 if (((bitField0_ & 0x00000002) == 0x00000002)) { 667 size += com.google.protobuf.CodedOutputStream 668 .computeBytesSize(2, indexdata_); 669 } 670 if (((bitField0_ & 0x00000004) == 0x00000004)) { 671 size += com.google.protobuf.CodedOutputStream 672 .computeInt32Size(3, datasize_); 673 } 674 memoizedSerializedSize = size; 675 return size; 676 } 677 678 private static final long serialVersionUID = 0L; 679 @java.lang.Override 680 protected java.lang.Object writeReplace() 681 throws java.io.ObjectStreamException { 682 return super.writeReplace(); 683 } 684 685 public static crosby.binary.Fileformat.BlobHeader parseFrom( 686 com.google.protobuf.ByteString data) 687 throws com.google.protobuf.InvalidProtocolBufferException { 688 return newBuilder().mergeFrom(data).buildParsed(); 689 } 690 public static crosby.binary.Fileformat.BlobHeader parseFrom( 691 com.google.protobuf.ByteString data, 899 900 private BlobHeader( 901 com.google.protobuf.CodedInputStream input, 692 902 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 693 903 throws com.google.protobuf.InvalidProtocolBufferException { 694 return newBuilder().mergeFrom(data, extensionRegistry) 695 .buildParsed(); 696 } 697 public static crosby.binary.Fileformat.BlobHeader parseFrom(byte[] data) 698 throws com.google.protobuf.InvalidProtocolBufferException { 699 return newBuilder().mergeFrom(data).buildParsed(); 700 } 701 public static crosby.binary.Fileformat.BlobHeader parseFrom( 702 byte[] data, 703 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 704 throws com.google.protobuf.InvalidProtocolBufferException { 705 return newBuilder().mergeFrom(data, extensionRegistry) 706 .buildParsed(); 707 } 708 public static crosby.binary.Fileformat.BlobHeader parseFrom(java.io.InputStream input) 709 throws java.io.IOException { 710 return newBuilder().mergeFrom(input).buildParsed(); 711 } 712 public static crosby.binary.Fileformat.BlobHeader parseFrom( 713 java.io.InputStream input, 714 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 715 throws java.io.IOException { 716 return newBuilder().mergeFrom(input, extensionRegistry) 717 .buildParsed(); 718 } 719 public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input) 720 throws java.io.IOException { 721 Builder builder = newBuilder(); 722 if (builder.mergeDelimitedFrom(input)) { 723 return builder.buildParsed(); 724 } else { 725 return null; 726 } 727 } 728 public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom( 729 java.io.InputStream input, 730 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 731 throws java.io.IOException { 732 Builder builder = newBuilder(); 733 if (builder.mergeDelimitedFrom(input, extensionRegistry)) { 734 return builder.buildParsed(); 735 } else { 736 return null; 737 } 738 } 739 public static crosby.binary.Fileformat.BlobHeader parseFrom( 740 com.google.protobuf.CodedInputStream input) 741 throws java.io.IOException { 742 return newBuilder().mergeFrom(input).buildParsed(); 743 } 744 public static crosby.binary.Fileformat.BlobHeader parseFrom( 745 com.google.protobuf.CodedInputStream input, 746 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 747 throws java.io.IOException { 748 return newBuilder().mergeFrom(input, extensionRegistry) 749 .buildParsed(); 750 } 751 752 public static Builder newBuilder() { return Builder.create(); } 753 public Builder newBuilderForType() { return newBuilder(); } 754 public static Builder newBuilder(crosby.binary.Fileformat.BlobHeader prototype) { 755 return newBuilder().mergeFrom(prototype); 756 } 757 public Builder toBuilder() { return newBuilder(this); } 758 759 public static final class Builder extends 760 com.google.protobuf.GeneratedMessageLite.Builder< 761 crosby.binary.Fileformat.BlobHeader, Builder> 762 implements crosby.binary.Fileformat.BlobHeaderOrBuilder { 763 // Construct using crosby.binary.Fileformat.BlobHeader.newBuilder() 764 private Builder() { 765 maybeForceBuilderInitialization(); 766 } 767 768 private void maybeForceBuilderInitialization() { 769 } 770 private static Builder create() { 771 return new Builder(); 772 } 773 774 public Builder clear() { 775 super.clear(); 776 type_ = ""; 777 bitField0_ = (bitField0_ & ~0x00000001); 778 indexdata_ = com.google.protobuf.ByteString.EMPTY; 779 bitField0_ = (bitField0_ & ~0x00000002); 780 datasize_ = 0; 781 bitField0_ = (bitField0_ & ~0x00000004); 782 return this; 783 } 784 785 public Builder clone() { 786 return create().mergeFrom(buildPartial()); 787 } 788 789 public crosby.binary.Fileformat.BlobHeader getDefaultInstanceForType() { 790 return crosby.binary.Fileformat.BlobHeader.getDefaultInstance(); 791 } 792 793 public crosby.binary.Fileformat.BlobHeader build() { 794 crosby.binary.Fileformat.BlobHeader result = buildPartial(); 795 if (!result.isInitialized()) { 796 throw newUninitializedMessageException(result); 797 } 798 return result; 799 } 800 801 private crosby.binary.Fileformat.BlobHeader buildParsed() 802 throws com.google.protobuf.InvalidProtocolBufferException { 803 crosby.binary.Fileformat.BlobHeader result = buildPartial(); 804 if (!result.isInitialized()) { 805 throw newUninitializedMessageException( 806 result).asInvalidProtocolBufferException(); 807 } 808 return result; 809 } 810 811 public crosby.binary.Fileformat.BlobHeader buildPartial() { 812 crosby.binary.Fileformat.BlobHeader result = new crosby.binary.Fileformat.BlobHeader(this); 813 int from_bitField0_ = bitField0_; 814 int to_bitField0_ = 0; 815 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 816 to_bitField0_ |= 0x00000001; 817 } 818 result.type_ = type_; 819 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 820 to_bitField0_ |= 0x00000002; 821 } 822 result.indexdata_ = indexdata_; 823 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 824 to_bitField0_ |= 0x00000004; 825 } 826 result.datasize_ = datasize_; 827 result.bitField0_ = to_bitField0_; 828 return result; 829 } 830 831 public Builder mergeFrom(crosby.binary.Fileformat.BlobHeader other) { 832 if (other == crosby.binary.Fileformat.BlobHeader.getDefaultInstance()) return this; 833 if (other.hasType()) { 834 setType(other.getType()); 835 } 836 if (other.hasIndexdata()) { 837 setIndexdata(other.getIndexdata()); 838 } 839 if (other.hasDatasize()) { 840 setDatasize(other.getDatasize()); 841 } 842 return this; 843 } 844 845 public final boolean isInitialized() { 846 if (!hasType()) { 847 848 return false; 849 } 850 if (!hasDatasize()) { 851 852 return false; 853 } 854 return true; 855 } 856 857 public Builder mergeFrom( 858 com.google.protobuf.CodedInputStream input, 859 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 860 throws java.io.IOException { 861 while (true) { 904 initFields(); 905 int mutable_bitField0_ = 0; 906 try { 907 boolean done = false; 908 while (!done) { 862 909 int tag = input.readTag(); 863 910 switch (tag) { 864 911 case 0: 865 866 return this;912 done = true; 913 break; 867 914 default: { 868 if (!parseUnknownField(input, extensionRegistry, tag)) {869 870 return this;915 if (!parseUnknownField(input, 916 extensionRegistry, tag)) { 917 done = true; 871 918 } 872 919 break; … … 889 936 } 890 937 } 891 } 892 938 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 939 throw e.setUnfinishedMessage(this); 940 } catch (java.io.IOException e) { 941 throw new com.google.protobuf.InvalidProtocolBufferException( 942 e.getMessage()).setUnfinishedMessage(this); 943 } finally { 944 makeExtensionsImmutable(); 945 } 946 } 947 public static com.google.protobuf.Parser<BlobHeader> PARSER = 948 new com.google.protobuf.AbstractParser<BlobHeader>() { 949 public BlobHeader parsePartialFrom( 950 com.google.protobuf.CodedInputStream input, 951 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 952 throws com.google.protobuf.InvalidProtocolBufferException { 953 return new BlobHeader(input, extensionRegistry); 954 } 955 }; 956 957 @java.lang.Override 958 public com.google.protobuf.Parser<BlobHeader> getParserForType() { 959 return PARSER; 960 } 961 962 private int bitField0_; 963 // required string type = 1; 964 public static final int TYPE_FIELD_NUMBER = 1; 965 private java.lang.Object type_; 966 /** 967 * <code>required string type = 1;</code> 968 */ 969 public boolean hasType() { 970 return ((bitField0_ & 0x00000001) == 0x00000001); 971 } 972 /** 973 * <code>required string type = 1;</code> 974 */ 975 public java.lang.String getType() { 976 java.lang.Object ref = type_; 977 if (ref instanceof java.lang.String) { 978 return (java.lang.String) ref; 979 } else { 980 com.google.protobuf.ByteString bs = 981 (com.google.protobuf.ByteString) ref; 982 java.lang.String s = bs.toStringUtf8(); 983 if (bs.isValidUtf8()) { 984 type_ = s; 985 } 986 return s; 987 } 988 } 989 /** 990 * <code>required string type = 1;</code> 991 */ 992 public com.google.protobuf.ByteString 993 getTypeBytes() { 994 java.lang.Object ref = type_; 995 if (ref instanceof java.lang.String) { 996 com.google.protobuf.ByteString b = 997 com.google.protobuf.ByteString.copyFromUtf8( 998 (java.lang.String) ref); 999 type_ = b; 1000 return b; 1001 } else { 1002 return (com.google.protobuf.ByteString) ref; 1003 } 1004 } 1005 1006 // optional bytes indexdata = 2; 1007 public static final int INDEXDATA_FIELD_NUMBER = 2; 1008 private com.google.protobuf.ByteString indexdata_; 1009 /** 1010 * <code>optional bytes indexdata = 2;</code> 1011 */ 1012 public boolean hasIndexdata() { 1013 return ((bitField0_ & 0x00000002) == 0x00000002); 1014 } 1015 /** 1016 * <code>optional bytes indexdata = 2;</code> 1017 */ 1018 public com.google.protobuf.ByteString getIndexdata() { 1019 return indexdata_; 1020 } 1021 1022 // required int32 datasize = 3; 1023 public static final int DATASIZE_FIELD_NUMBER = 3; 1024 private int datasize_; 1025 /** 1026 * <code>required int32 datasize = 3;</code> 1027 */ 1028 public boolean hasDatasize() { 1029 return ((bitField0_ & 0x00000004) == 0x00000004); 1030 } 1031 /** 1032 * <code>required int32 datasize = 3;</code> 1033 */ 1034 public int getDatasize() { 1035 return datasize_; 1036 } 1037 1038 private void initFields() { 1039 type_ = ""; 1040 indexdata_ = com.google.protobuf.ByteString.EMPTY; 1041 datasize_ = 0; 1042 } 1043 private byte memoizedIsInitialized = -1; 1044 public final boolean isInitialized() { 1045 byte isInitialized = memoizedIsInitialized; 1046 if (isInitialized != -1) return isInitialized == 1; 1047 1048 if (!hasType()) { 1049 memoizedIsInitialized = 0; 1050 return false; 1051 } 1052 if (!hasDatasize()) { 1053 memoizedIsInitialized = 0; 1054 return false; 1055 } 1056 memoizedIsInitialized = 1; 1057 return true; 1058 } 1059 1060 public void writeTo(com.google.protobuf.CodedOutputStream output) 1061 throws java.io.IOException { 1062 getSerializedSize(); 1063 if (((bitField0_ & 0x00000001) == 0x00000001)) { 1064 output.writeBytes(1, getTypeBytes()); 1065 } 1066 if (((bitField0_ & 0x00000002) == 0x00000002)) { 1067 output.writeBytes(2, indexdata_); 1068 } 1069 if (((bitField0_ & 0x00000004) == 0x00000004)) { 1070 output.writeInt32(3, datasize_); 1071 } 1072 } 1073 1074 private int memoizedSerializedSize = -1; 1075 public int getSerializedSize() { 1076 int size = memoizedSerializedSize; 1077 if (size != -1) return size; 1078 1079 size = 0; 1080 if (((bitField0_ & 0x00000001) == 0x00000001)) { 1081 size += com.google.protobuf.CodedOutputStream 1082 .computeBytesSize(1, getTypeBytes()); 1083 } 1084 if (((bitField0_ & 0x00000002) == 0x00000002)) { 1085 size += com.google.protobuf.CodedOutputStream 1086 .computeBytesSize(2, indexdata_); 1087 } 1088 if (((bitField0_ & 0x00000004) == 0x00000004)) { 1089 size += com.google.protobuf.CodedOutputStream 1090 .computeInt32Size(3, datasize_); 1091 } 1092 memoizedSerializedSize = size; 1093 return size; 1094 } 1095 1096 private static final long serialVersionUID = 0L; 1097 @java.lang.Override 1098 protected java.lang.Object writeReplace() 1099 throws java.io.ObjectStreamException { 1100 return super.writeReplace(); 1101 } 1102 1103 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1104 com.google.protobuf.ByteString data) 1105 throws com.google.protobuf.InvalidProtocolBufferException { 1106 return PARSER.parseFrom(data); 1107 } 1108 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1109 com.google.protobuf.ByteString data, 1110 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1111 throws com.google.protobuf.InvalidProtocolBufferException { 1112 return PARSER.parseFrom(data, extensionRegistry); 1113 } 1114 public static crosby.binary.Fileformat.BlobHeader parseFrom(byte[] data) 1115 throws com.google.protobuf.InvalidProtocolBufferException { 1116 return PARSER.parseFrom(data); 1117 } 1118 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1119 byte[] data, 1120 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1121 throws com.google.protobuf.InvalidProtocolBufferException { 1122 return PARSER.parseFrom(data, extensionRegistry); 1123 } 1124 public static crosby.binary.Fileformat.BlobHeader parseFrom(java.io.InputStream input) 1125 throws java.io.IOException { 1126 return PARSER.parseFrom(input); 1127 } 1128 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1129 java.io.InputStream input, 1130 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1131 throws java.io.IOException { 1132 return PARSER.parseFrom(input, extensionRegistry); 1133 } 1134 public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom(java.io.InputStream input) 1135 throws java.io.IOException { 1136 return PARSER.parseDelimitedFrom(input); 1137 } 1138 public static crosby.binary.Fileformat.BlobHeader parseDelimitedFrom( 1139 java.io.InputStream input, 1140 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1141 throws java.io.IOException { 1142 return PARSER.parseDelimitedFrom(input, extensionRegistry); 1143 } 1144 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1145 com.google.protobuf.CodedInputStream input) 1146 throws java.io.IOException { 1147 return PARSER.parseFrom(input); 1148 } 1149 public static crosby.binary.Fileformat.BlobHeader parseFrom( 1150 com.google.protobuf.CodedInputStream input, 1151 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1152 throws java.io.IOException { 1153 return PARSER.parseFrom(input, extensionRegistry); 1154 } 1155 1156 public static Builder newBuilder() { return Builder.create(); } 1157 public Builder newBuilderForType() { return newBuilder(); } 1158 public static Builder newBuilder(crosby.binary.Fileformat.BlobHeader prototype) { 1159 return newBuilder().mergeFrom(prototype); 1160 } 1161 public Builder toBuilder() { return newBuilder(this); } 1162 1163 /** 1164 * Protobuf type {@code OSMPBF.BlobHeader} 1165 */ 1166 public static final class Builder extends 1167 com.google.protobuf.GeneratedMessageLite.Builder< 1168 crosby.binary.Fileformat.BlobHeader, Builder> 1169 implements crosby.binary.Fileformat.BlobHeaderOrBuilder { 1170 // Construct using crosby.binary.Fileformat.BlobHeader.newBuilder() 1171 private Builder() { 1172 maybeForceBuilderInitialization(); 1173 } 1174 1175 private void maybeForceBuilderInitialization() { 1176 } 1177 private static Builder create() { 1178 return new Builder(); 1179 } 1180 1181 public Builder clear() { 1182 super.clear(); 1183 type_ = ""; 1184 bitField0_ = (bitField0_ & ~0x00000001); 1185 indexdata_ = com.google.protobuf.ByteString.EMPTY; 1186 bitField0_ = (bitField0_ & ~0x00000002); 1187 datasize_ = 0; 1188 bitField0_ = (bitField0_ & ~0x00000004); 1189 return this; 1190 } 1191 1192 public Builder clone() { 1193 return create().mergeFrom(buildPartial()); 1194 } 1195 1196 public crosby.binary.Fileformat.BlobHeader getDefaultInstanceForType() { 1197 return crosby.binary.Fileformat.BlobHeader.getDefaultInstance(); 1198 } 1199 1200 public crosby.binary.Fileformat.BlobHeader build() { 1201 crosby.binary.Fileformat.BlobHeader result = buildPartial(); 1202 if (!result.isInitialized()) { 1203 throw newUninitializedMessageException(result); 1204 } 1205 return result; 1206 } 1207 1208 public crosby.binary.Fileformat.BlobHeader buildPartial() { 1209 crosby.binary.Fileformat.BlobHeader result = new crosby.binary.Fileformat.BlobHeader(this); 1210 int from_bitField0_ = bitField0_; 1211 int to_bitField0_ = 0; 1212 if (((from_bitField0_ & 0x00000001) == 0x00000001)) { 1213 to_bitField0_ |= 0x00000001; 1214 } 1215 result.type_ = type_; 1216 if (((from_bitField0_ & 0x00000002) == 0x00000002)) { 1217 to_bitField0_ |= 0x00000002; 1218 } 1219 result.indexdata_ = indexdata_; 1220 if (((from_bitField0_ & 0x00000004) == 0x00000004)) { 1221 to_bitField0_ |= 0x00000004; 1222 } 1223 result.datasize_ = datasize_; 1224 result.bitField0_ = to_bitField0_; 1225 return result; 1226 } 1227 1228 public Builder mergeFrom(crosby.binary.Fileformat.BlobHeader other) { 1229 if (other == crosby.binary.Fileformat.BlobHeader.getDefaultInstance()) return this; 1230 if (other.hasType()) { 1231 bitField0_ |= 0x00000001; 1232 type_ = other.type_; 1233 1234 } 1235 if (other.hasIndexdata()) { 1236 setIndexdata(other.getIndexdata()); 1237 } 1238 if (other.hasDatasize()) { 1239 setDatasize(other.getDatasize()); 1240 } 1241 return this; 1242 } 1243 1244 public final boolean isInitialized() { 1245 if (!hasType()) { 1246 1247 return false; 1248 } 1249 if (!hasDatasize()) { 1250 1251 return false; 1252 } 1253 return true; 1254 } 1255 1256 public Builder mergeFrom( 1257 com.google.protobuf.CodedInputStream input, 1258 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1259 throws java.io.IOException { 1260 crosby.binary.Fileformat.BlobHeader parsedMessage = null; 1261 try { 1262 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 1263 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1264 parsedMessage = (crosby.binary.Fileformat.BlobHeader) e.getUnfinishedMessage(); 1265 throw e; 1266 } finally { 1267 if (parsedMessage != null) { 1268 mergeFrom(parsedMessage); 1269 } 1270 } 1271 return this; 1272 } 893 1273 private int bitField0_; 894 1274 895 1275 // required string type = 1; 896 1276 private java.lang.Object type_ = ""; 1277 /** 1278 * <code>required string type = 1;</code> 1279 */ 897 1280 public boolean hasType() { 898 1281 return ((bitField0_ & 0x00000001) == 0x00000001); 899 1282 } 900 public String getType() { 1283 /** 1284 * <code>required string type = 1;</code> 1285 */ 1286 public java.lang.String getType() { 901 1287 java.lang.Object ref = type_; 902 if (!(ref instanceof String)) { 903 String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); 1288 if (!(ref instanceof java.lang.String)) { 1289 java.lang.String s = ((com.google.protobuf.ByteString) ref) 1290 .toStringUtf8(); 904 1291 type_ = s; 905 1292 return s; 906 1293 } else { 907 return (String) ref; 908 } 909 } 910 public Builder setType(String value) { 1294 return (java.lang.String) ref; 1295 } 1296 } 1297 /** 1298 * <code>required string type = 1;</code> 1299 */ 1300 public com.google.protobuf.ByteString 1301 getTypeBytes() { 1302 java.lang.Object ref = type_; 1303 if (ref instanceof String) { 1304 com.google.protobuf.ByteString b = 1305 com.google.protobuf.ByteString.copyFromUtf8( 1306 (java.lang.String) ref); 1307 type_ = b; 1308 return b; 1309 } else { 1310 return (com.google.protobuf.ByteString) ref; 1311 } 1312 } 1313 /** 1314 * <code>required string type = 1;</code> 1315 */ 1316 public Builder setType( 1317 java.lang.String value) { 911 1318 if (value == null) { 912 1319 throw new NullPointerException(); … … 917 1324 return this; 918 1325 } 1326 /** 1327 * <code>required string type = 1;</code> 1328 */ 919 1329 public Builder clearType() { 920 1330 bitField0_ = (bitField0_ & ~0x00000001); … … 923 1333 return this; 924 1334 } 925 void setType(com.google.protobuf.ByteString value) { 926 bitField0_ |= 0x00000001; 1335 /** 1336 * <code>required string type = 1;</code> 1337 */ 1338 public Builder setTypeBytes( 1339 com.google.protobuf.ByteString value) { 1340 if (value == null) { 1341 throw new NullPointerException(); 1342 } 1343 bitField0_ |= 0x00000001; 927 1344 type_ = value; 928 1345 929 } 930 1346 return this; 1347 } 1348 931 1349 // optional bytes indexdata = 2; 932 1350 private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY; 1351 /** 1352 * <code>optional bytes indexdata = 2;</code> 1353 */ 933 1354 public boolean hasIndexdata() { 934 1355 return ((bitField0_ & 0x00000002) == 0x00000002); 935 1356 } 1357 /** 1358 * <code>optional bytes indexdata = 2;</code> 1359 */ 936 1360 public com.google.protobuf.ByteString getIndexdata() { 937 1361 return indexdata_; 938 1362 } 1363 /** 1364 * <code>optional bytes indexdata = 2;</code> 1365 */ 939 1366 public Builder setIndexdata(com.google.protobuf.ByteString value) { 940 1367 if (value == null) { … … 946 1373 return this; 947 1374 } 1375 /** 1376 * <code>optional bytes indexdata = 2;</code> 1377 */ 948 1378 public Builder clearIndexdata() { 949 1379 bitField0_ = (bitField0_ & ~0x00000002); … … 952 1382 return this; 953 1383 } 954 1384 955 1385 // required int32 datasize = 3; 956 1386 private int datasize_ ; 1387 /** 1388 * <code>required int32 datasize = 3;</code> 1389 */ 957 1390 public boolean hasDatasize() { 958 1391 return ((bitField0_ & 0x00000004) == 0x00000004); 959 1392 } 1393 /** 1394 * <code>required int32 datasize = 3;</code> 1395 */ 960 1396 public int getDatasize() { 961 1397 return datasize_; 962 1398 } 1399 /** 1400 * <code>required int32 datasize = 3;</code> 1401 */ 963 1402 public Builder setDatasize(int value) { 964 1403 bitField0_ |= 0x00000004; … … 967 1406 return this; 968 1407 } 1408 /** 1409 * <code>required int32 datasize = 3;</code> 1410 */ 969 1411 public Builder clearDatasize() { 970 1412 bitField0_ = (bitField0_ & ~0x00000004); … … 973 1415 return this; 974 1416 } 975 1417 976 1418 // @@protoc_insertion_point(builder_scope:OSMPBF.BlobHeader) 977 1419 } 978 1420 979 1421 static { 980 1422 defaultInstance = new BlobHeader(true); 981 1423 defaultInstance.initFields(); 982 1424 } 983 1425 984 1426 // @@protoc_insertion_point(class_scope:OSMPBF.BlobHeader) 985 1427 } 986 987 1428 1429 988 1430 static { 989 1431 } 990 1432 991 1433 // @@protoc_insertion_point(outer_class_scope) 992 1434 }
Note:
See TracChangeset
for help on using the changeset viewer.
