Changeset 30658 in osm for applications/editors/josm/plugins/pbf/gen/crosby/binary/Fileformat.java
- Timestamp:
- 2014-09-18T16:16:38+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/pbf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pbf
- Property svn:externals
-
old new 1 1 proto https://github.com/scrosby/OSM-binary/trunk/src 2 protobuf http://protobuf.googlecode.com/svn/tags/2. 5.0/src/google/protobuf/2 protobuf http://protobuf.googlecode.com/svn/tags/2.6.0/src/google/protobuf/
-
- Property svn:externals
-
applications/editors/josm/plugins/pbf/gen/crosby/binary/Fileformat.java
r30490 r30658 1 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: src/crosby/binary/fileformat.proto2 // source: fileformat.proto 3 3 4 4 package crosby.binary; … … 9 9 com.google.protobuf.ExtensionRegistryLite registry) { 10 10 } 11 public interface BlobOrBuilder 12 extends com.google.protobuf.MessageLiteOrBuilder {13 14 // optional bytes raw = 1; 11 public interface BlobOrBuilder extends 12 // @@protoc_insertion_point(interface_extends:OSMPBF.Blob) 13 com.google.protobuf.MessageLiteOrBuilder { 14 15 15 /** 16 16 * <code>optional bytes raw = 1;</code> … … 30 30 com.google.protobuf.ByteString getRaw(); 31 31 32 // optional int32 raw_size = 2;33 32 /** 34 33 * <code>optional int32 raw_size = 2;</code> … … 48 47 int getRawSize(); 49 48 50 // optional bytes zlib_data = 3;51 49 /** 52 50 * <code>optional bytes zlib_data = 3;</code> … … 66 64 com.google.protobuf.ByteString getZlibData(); 67 65 68 // optional bytes lzma_data = 4;69 66 /** 70 67 * <code>optional bytes lzma_data = 4;</code> … … 84 81 com.google.protobuf.ByteString getLzmaData(); 85 82 86 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];87 83 /** 88 84 * <code>optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];</code> … … 106 102 */ 107 103 public static final class Blob extends 108 com.google.protobuf.GeneratedMessageLite 109 implements BlobOrBuilder { 104 com.google.protobuf.GeneratedMessageLite implements 105 // @@protoc_insertion_point(message_implements:OSMPBF.Blob) 106 BlobOrBuilder { 110 107 // Use Blob.newBuilder() to construct. 111 108 private Blob(com.google.protobuf.GeneratedMessageLite.Builder builder) { 112 109 super(builder); 113 114 } 115 private Blob(boolean noInit) {} 110 this.unknownFields = builder.getUnknownFields(); 111 } 112 private Blob(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} 116 113 117 114 private static final Blob defaultInstance; … … 124 121 } 125 122 123 private final com.google.protobuf.ByteString unknownFields; 126 124 private Blob( 127 125 com.google.protobuf.CodedInputStream input, … … 130 128 initFields(); 131 129 int mutable_bitField0_ = 0; 130 com.google.protobuf.ByteString.Output unknownFieldsOutput = 131 com.google.protobuf.ByteString.newOutput(); 132 com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = 133 com.google.protobuf.CodedOutputStream.newInstance( 134 unknownFieldsOutput); 132 135 try { 133 136 boolean done = false; … … 139 142 break; 140 143 default: { 141 if (!parseUnknownField(input, 144 if (!parseUnknownField(input, unknownFieldsCodedOutput, 142 145 extensionRegistry, tag)) { 143 146 done = true; … … 178 181 e.getMessage()).setUnfinishedMessage(this); 179 182 } finally { 183 try { 184 unknownFieldsCodedOutput.flush(); 185 } catch (java.io.IOException e) { 186 // Should not happen 187 } finally { 188 unknownFields = unknownFieldsOutput.toByteString(); 189 } 180 190 makeExtensionsImmutable(); 181 191 } … … 197 207 198 208 private int bitField0_; 199 // optional bytes raw = 1;200 209 public static final int RAW_FIELD_NUMBER = 1; 201 210 private com.google.protobuf.ByteString raw_; … … 221 230 } 222 231 223 // optional int32 raw_size = 2;224 232 public static final int RAW_SIZE_FIELD_NUMBER = 2; 225 233 private int rawSize_; … … 245 253 } 246 254 247 // optional bytes zlib_data = 3;248 255 public static final int ZLIB_DATA_FIELD_NUMBER = 3; 249 256 private com.google.protobuf.ByteString zlibData_; … … 269 276 } 270 277 271 // optional bytes lzma_data = 4;272 278 public static final int LZMA_DATA_FIELD_NUMBER = 4; 273 279 private com.google.protobuf.ByteString lzmaData_; … … 293 299 } 294 300 295 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];296 301 public static final int OBSOLETE_BZIP2_DATA_FIELD_NUMBER = 5; 297 302 private com.google.protobuf.ByteString oBSOLETEBzip2Data_; … … 327 332 public final boolean isInitialized() { 328 333 byte isInitialized = memoizedIsInitialized; 329 if (isInitialized != -1) return isInitialized == 1; 334 if (isInitialized == 1) return true; 335 if (isInitialized == 0) return false; 330 336 331 337 memoizedIsInitialized = 1; … … 351 357 output.writeBytes(5, oBSOLETEBzip2Data_); 352 358 } 359 output.writeRawBytes(unknownFields); 353 360 } 354 361 … … 379 386 .computeBytesSize(5, oBSOLETEBzip2Data_); 380 387 } 388 size += unknownFields.size(); 381 389 memoizedSerializedSize = size; 382 390 return size; … … 456 464 com.google.protobuf.GeneratedMessageLite.Builder< 457 465 crosby.binary.Fileformat.Blob, Builder> 458 implements crosby.binary.Fileformat.BlobOrBuilder { 466 implements 467 // @@protoc_insertion_point(builder_implements:OSMPBF.Blob) 468 crosby.binary.Fileformat.BlobOrBuilder { 459 469 // Construct using crosby.binary.Fileformat.Blob.newBuilder() 460 470 private Builder() { … … 544 554 setOBSOLETEBzip2Data(other.getOBSOLETEBzip2Data()); 545 555 } 556 setUnknownFields( 557 getUnknownFields().concat(other.unknownFields)); 546 558 return this; 547 559 } … … 570 582 private int bitField0_; 571 583 572 // optional bytes raw = 1;573 584 private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY; 574 585 /** … … 622 633 } 623 634 624 // optional int32 raw_size = 2;625 635 private int rawSize_ ; 626 636 /** … … 671 681 } 672 682 673 // optional bytes zlib_data = 3;674 683 private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY; 675 684 /** … … 723 732 } 724 733 725 // optional bytes lzma_data = 4;726 734 private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY; 727 735 /** … … 775 783 } 776 784 777 // optional bytes OBSOLETE_bzip2_data = 5 [deprecated = true];778 785 private com.google.protobuf.ByteString oBSOLETEBzip2Data_ = com.google.protobuf.ByteString.EMPTY; 779 786 /** … … 838 845 } 839 846 840 public interface BlobHeaderOrBuilder 841 extends com.google.protobuf.MessageLiteOrBuilder {842 843 // required string type = 1; 847 public interface BlobHeaderOrBuilder extends 848 // @@protoc_insertion_point(interface_extends:OSMPBF.BlobHeader) 849 com.google.protobuf.MessageLiteOrBuilder { 850 844 851 /** 845 852 * <code>required string type = 1;</code> … … 856 863 getTypeBytes(); 857 864 858 // optional bytes indexdata = 2;859 865 /** 860 866 * <code>optional bytes indexdata = 2;</code> … … 866 872 com.google.protobuf.ByteString getIndexdata(); 867 873 868 // required int32 datasize = 3;869 874 /** 870 875 * <code>required int32 datasize = 3;</code> … … 880 885 */ 881 886 public static final class BlobHeader extends 882 com.google.protobuf.GeneratedMessageLite 883 implements BlobHeaderOrBuilder { 887 com.google.protobuf.GeneratedMessageLite implements 888 // @@protoc_insertion_point(message_implements:OSMPBF.BlobHeader) 889 BlobHeaderOrBuilder { 884 890 // Use BlobHeader.newBuilder() to construct. 885 891 private BlobHeader(com.google.protobuf.GeneratedMessageLite.Builder builder) { 886 892 super(builder); 887 888 } 889 private BlobHeader(boolean noInit) {} 893 this.unknownFields = builder.getUnknownFields(); 894 } 895 private BlobHeader(boolean noInit) { this.unknownFields = com.google.protobuf.ByteString.EMPTY;} 890 896 891 897 private static final BlobHeader defaultInstance; … … 898 904 } 899 905 906 private final com.google.protobuf.ByteString unknownFields; 900 907 private BlobHeader( 901 908 com.google.protobuf.CodedInputStream input, … … 904 911 initFields(); 905 912 int mutable_bitField0_ = 0; 913 com.google.protobuf.ByteString.Output unknownFieldsOutput = 914 com.google.protobuf.ByteString.newOutput(); 915 com.google.protobuf.CodedOutputStream unknownFieldsCodedOutput = 916 com.google.protobuf.CodedOutputStream.newInstance( 917 unknownFieldsOutput); 906 918 try { 907 919 boolean done = false; … … 913 925 break; 914 926 default: { 915 if (!parseUnknownField(input, 927 if (!parseUnknownField(input, unknownFieldsCodedOutput, 916 928 extensionRegistry, tag)) { 917 929 done = true; … … 920 932 } 921 933 case 10: { 934 com.google.protobuf.ByteString bs = input.readBytes(); 922 935 bitField0_ |= 0x00000001; 923 type_ = input.readBytes();936 type_ = bs; 924 937 break; 925 938 } … … 942 955 e.getMessage()).setUnfinishedMessage(this); 943 956 } finally { 957 try { 958 unknownFieldsCodedOutput.flush(); 959 } catch (java.io.IOException e) { 960 // Should not happen 961 } finally { 962 unknownFields = unknownFieldsOutput.toByteString(); 963 } 944 964 makeExtensionsImmutable(); 945 965 } … … 961 981 962 982 private int bitField0_; 963 // required string type = 1;964 983 public static final int TYPE_FIELD_NUMBER = 1; 965 984 private java.lang.Object type_; … … 1004 1023 } 1005 1024 1006 // optional bytes indexdata = 2;1007 1025 public static final int INDEXDATA_FIELD_NUMBER = 2; 1008 1026 private com.google.protobuf.ByteString indexdata_; … … 1020 1038 } 1021 1039 1022 // required int32 datasize = 3;1023 1040 public static final int DATASIZE_FIELD_NUMBER = 3; 1024 1041 private int datasize_; … … 1044 1061 public final boolean isInitialized() { 1045 1062 byte isInitialized = memoizedIsInitialized; 1046 if (isInitialized != -1) return isInitialized == 1; 1063 if (isInitialized == 1) return true; 1064 if (isInitialized == 0) return false; 1047 1065 1048 1066 if (!hasType()) { … … 1070 1088 output.writeInt32(3, datasize_); 1071 1089 } 1090 output.writeRawBytes(unknownFields); 1072 1091 } 1073 1092 … … 1090 1109 .computeInt32Size(3, datasize_); 1091 1110 } 1111 size += unknownFields.size(); 1092 1112 memoizedSerializedSize = size; 1093 1113 return size; … … 1167 1187 com.google.protobuf.GeneratedMessageLite.Builder< 1168 1188 crosby.binary.Fileformat.BlobHeader, Builder> 1169 implements crosby.binary.Fileformat.BlobHeaderOrBuilder { 1189 implements 1190 // @@protoc_insertion_point(builder_implements:OSMPBF.BlobHeader) 1191 crosby.binary.Fileformat.BlobHeaderOrBuilder { 1170 1192 // Construct using crosby.binary.Fileformat.BlobHeader.newBuilder() 1171 1193 private Builder() { … … 1239 1261 setDatasize(other.getDatasize()); 1240 1262 } 1263 setUnknownFields( 1264 getUnknownFields().concat(other.unknownFields)); 1241 1265 return this; 1242 1266 } … … 1273 1297 private int bitField0_; 1274 1298 1275 // required string type = 1;1276 1299 private java.lang.Object type_ = ""; 1277 1300 /** … … 1287 1310 java.lang.Object ref = type_; 1288 1311 if (!(ref instanceof java.lang.String)) { 1289 java.lang.String s = ((com.google.protobuf.ByteString) ref) 1290 .toStringUtf8(); 1291 type_ = s; 1312 com.google.protobuf.ByteString bs = 1313 (com.google.protobuf.ByteString) ref; 1314 java.lang.String s = bs.toStringUtf8(); 1315 if (bs.isValidUtf8()) { 1316 type_ = s; 1317 } 1292 1318 return s; 1293 1319 } else { … … 1347 1373 } 1348 1374 1349 // optional bytes indexdata = 2;1350 1375 private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY; 1351 1376 /** … … 1383 1408 } 1384 1409 1385 // required int32 datasize = 3;1386 1410 private int datasize_ ; 1387 1411 /**
Note:
See TracChangeset
for help on using the changeset viewer.