PageRenderTime 49ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/DataExtractionOSM/src/crosby/binary/Fileformat.java

https://code.google.com/
Java | 926 lines | 820 code | 79 blank | 27 comment | 80 complexity | 2d43b33726d654160e596c899403c52e MD5 | raw file
Possible License(s): MIT
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: fileformat.proto
  3. package crosby.binary;
  4. public final class Fileformat {
  5. private Fileformat() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class Blob extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use Blob.newBuilder() to construct.
  12. private Blob() {
  13. initFields();
  14. }
  15. private Blob(boolean noInit) {}
  16. private static final Blob defaultInstance;
  17. public static Blob getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. @Override
  21. public Blob getDefaultInstanceForType() {
  22. return defaultInstance;
  23. }
  24. public static final com.google.protobuf.Descriptors.Descriptor
  25. getDescriptor() {
  26. return crosby.binary.Fileformat.internal_static_Blob_descriptor;
  27. }
  28. @Override
  29. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  30. internalGetFieldAccessorTable() {
  31. return crosby.binary.Fileformat.internal_static_Blob_fieldAccessorTable;
  32. }
  33. // optional bytes raw = 1;
  34. public static final int RAW_FIELD_NUMBER = 1;
  35. private boolean hasRaw;
  36. private com.google.protobuf.ByteString raw_ = com.google.protobuf.ByteString.EMPTY;
  37. public boolean hasRaw() { return hasRaw; }
  38. public com.google.protobuf.ByteString getRaw() { return raw_; }
  39. // optional int32 raw_size = 2;
  40. public static final int RAW_SIZE_FIELD_NUMBER = 2;
  41. private boolean hasRawSize;
  42. private int rawSize_ = 0;
  43. public boolean hasRawSize() { return hasRawSize; }
  44. public int getRawSize() { return rawSize_; }
  45. // optional bytes zlib_data = 3;
  46. public static final int ZLIB_DATA_FIELD_NUMBER = 3;
  47. private boolean hasZlibData;
  48. private com.google.protobuf.ByteString zlibData_ = com.google.protobuf.ByteString.EMPTY;
  49. public boolean hasZlibData() { return hasZlibData; }
  50. public com.google.protobuf.ByteString getZlibData() { return zlibData_; }
  51. // optional bytes lzma_data = 4;
  52. public static final int LZMA_DATA_FIELD_NUMBER = 4;
  53. private boolean hasLzmaData;
  54. private com.google.protobuf.ByteString lzmaData_ = com.google.protobuf.ByteString.EMPTY;
  55. public boolean hasLzmaData() { return hasLzmaData; }
  56. public com.google.protobuf.ByteString getLzmaData() { return lzmaData_; }
  57. // optional bytes bzip2_data = 5;
  58. public static final int BZIP2_DATA_FIELD_NUMBER = 5;
  59. private boolean hasBzip2Data;
  60. private com.google.protobuf.ByteString bzip2Data_ = com.google.protobuf.ByteString.EMPTY;
  61. public boolean hasBzip2Data() { return hasBzip2Data; }
  62. public com.google.protobuf.ByteString getBzip2Data() { return bzip2Data_; }
  63. private void initFields() {
  64. }
  65. @Override
  66. public final boolean isInitialized() {
  67. return true;
  68. }
  69. @Override
  70. public void writeTo(com.google.protobuf.CodedOutputStream output)
  71. throws java.io.IOException {
  72. getSerializedSize();
  73. if (hasRaw()) {
  74. output.writeBytes(1, getRaw());
  75. }
  76. if (hasRawSize()) {
  77. output.writeInt32(2, getRawSize());
  78. }
  79. if (hasZlibData()) {
  80. output.writeBytes(3, getZlibData());
  81. }
  82. if (hasLzmaData()) {
  83. output.writeBytes(4, getLzmaData());
  84. }
  85. if (hasBzip2Data()) {
  86. output.writeBytes(5, getBzip2Data());
  87. }
  88. getUnknownFields().writeTo(output);
  89. }
  90. private int memoizedSerializedSize = -1;
  91. @Override
  92. public int getSerializedSize() {
  93. int size = memoizedSerializedSize;
  94. if (size != -1) return size;
  95. size = 0;
  96. if (hasRaw()) {
  97. size += com.google.protobuf.CodedOutputStream
  98. .computeBytesSize(1, getRaw());
  99. }
  100. if (hasRawSize()) {
  101. size += com.google.protobuf.CodedOutputStream
  102. .computeInt32Size(2, getRawSize());
  103. }
  104. if (hasZlibData()) {
  105. size += com.google.protobuf.CodedOutputStream
  106. .computeBytesSize(3, getZlibData());
  107. }
  108. if (hasLzmaData()) {
  109. size += com.google.protobuf.CodedOutputStream
  110. .computeBytesSize(4, getLzmaData());
  111. }
  112. if (hasBzip2Data()) {
  113. size += com.google.protobuf.CodedOutputStream
  114. .computeBytesSize(5, getBzip2Data());
  115. }
  116. size += getUnknownFields().getSerializedSize();
  117. memoizedSerializedSize = size;
  118. return size;
  119. }
  120. public static crosby.binary.Fileformat.Blob parseFrom(
  121. com.google.protobuf.ByteString data)
  122. throws com.google.protobuf.InvalidProtocolBufferException {
  123. return newBuilder().mergeFrom(data).buildParsed();
  124. }
  125. public static crosby.binary.Fileformat.Blob parseFrom(
  126. com.google.protobuf.ByteString data,
  127. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  128. throws com.google.protobuf.InvalidProtocolBufferException {
  129. return newBuilder().mergeFrom(data, extensionRegistry)
  130. .buildParsed();
  131. }
  132. public static crosby.binary.Fileformat.Blob parseFrom(byte[] data)
  133. throws com.google.protobuf.InvalidProtocolBufferException {
  134. return newBuilder().mergeFrom(data).buildParsed();
  135. }
  136. public static crosby.binary.Fileformat.Blob parseFrom(
  137. byte[] data,
  138. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  139. throws com.google.protobuf.InvalidProtocolBufferException {
  140. return newBuilder().mergeFrom(data, extensionRegistry)
  141. .buildParsed();
  142. }
  143. public static crosby.binary.Fileformat.Blob parseFrom(java.io.InputStream input)
  144. throws java.io.IOException {
  145. return newBuilder().mergeFrom(input).buildParsed();
  146. }
  147. public static crosby.binary.Fileformat.Blob parseFrom(
  148. java.io.InputStream input,
  149. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  150. throws java.io.IOException {
  151. return newBuilder().mergeFrom(input, extensionRegistry)
  152. .buildParsed();
  153. }
  154. public static crosby.binary.Fileformat.Blob parseDelimitedFrom(java.io.InputStream input)
  155. throws java.io.IOException {
  156. Builder builder = newBuilder();
  157. if (builder.mergeDelimitedFrom(input)) {
  158. return builder.buildParsed();
  159. } else {
  160. return null;
  161. }
  162. }
  163. public static crosby.binary.Fileformat.Blob parseDelimitedFrom(
  164. java.io.InputStream input,
  165. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  166. throws java.io.IOException {
  167. Builder builder = newBuilder();
  168. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  169. return builder.buildParsed();
  170. } else {
  171. return null;
  172. }
  173. }
  174. public static crosby.binary.Fileformat.Blob parseFrom(
  175. com.google.protobuf.CodedInputStream input)
  176. throws java.io.IOException {
  177. return newBuilder().mergeFrom(input).buildParsed();
  178. }
  179. public static crosby.binary.Fileformat.Blob parseFrom(
  180. com.google.protobuf.CodedInputStream input,
  181. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  182. throws java.io.IOException {
  183. return newBuilder().mergeFrom(input, extensionRegistry)
  184. .buildParsed();
  185. }
  186. public static Builder newBuilder() { return Builder.create(); }
  187. @Override
  188. public Builder newBuilderForType() { return newBuilder(); }
  189. public static Builder newBuilder(crosby.binary.Fileformat.Blob prototype) {
  190. return newBuilder().mergeFrom(prototype);
  191. }
  192. @Override
  193. public Builder toBuilder() { return newBuilder(this); }
  194. public static final class Builder extends
  195. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  196. private crosby.binary.Fileformat.Blob result;
  197. // Construct using crosby.binary.Fileformat.Blob.newBuilder()
  198. private Builder() {}
  199. private static Builder create() {
  200. Builder builder = new Builder();
  201. builder.result = new crosby.binary.Fileformat.Blob();
  202. return builder;
  203. }
  204. @Override
  205. protected crosby.binary.Fileformat.Blob internalGetResult() {
  206. return result;
  207. }
  208. @Override
  209. public Builder clear() {
  210. if (result == null) {
  211. throw new IllegalStateException(
  212. "Cannot call clear() after build().");
  213. }
  214. result = new crosby.binary.Fileformat.Blob();
  215. return this;
  216. }
  217. @Override
  218. public Builder clone() {
  219. return create().mergeFrom(result);
  220. }
  221. @Override
  222. public com.google.protobuf.Descriptors.Descriptor
  223. getDescriptorForType() {
  224. return crosby.binary.Fileformat.Blob.getDescriptor();
  225. }
  226. @Override
  227. public crosby.binary.Fileformat.Blob getDefaultInstanceForType() {
  228. return crosby.binary.Fileformat.Blob.getDefaultInstance();
  229. }
  230. @Override
  231. public boolean isInitialized() {
  232. return result.isInitialized();
  233. }
  234. @Override
  235. public crosby.binary.Fileformat.Blob build() {
  236. if (result != null && !isInitialized()) {
  237. throw newUninitializedMessageException(result);
  238. }
  239. return buildPartial();
  240. }
  241. private crosby.binary.Fileformat.Blob buildParsed()
  242. throws com.google.protobuf.InvalidProtocolBufferException {
  243. if (!isInitialized()) {
  244. throw newUninitializedMessageException(
  245. result).asInvalidProtocolBufferException();
  246. }
  247. return buildPartial();
  248. }
  249. @Override
  250. public crosby.binary.Fileformat.Blob buildPartial() {
  251. if (result == null) {
  252. throw new IllegalStateException(
  253. "build() has already been called on this Builder.");
  254. }
  255. crosby.binary.Fileformat.Blob returnMe = result;
  256. result = null;
  257. return returnMe;
  258. }
  259. @Override
  260. public Builder mergeFrom(com.google.protobuf.Message other) {
  261. if (other instanceof crosby.binary.Fileformat.Blob) {
  262. return mergeFrom((crosby.binary.Fileformat.Blob)other);
  263. } else {
  264. super.mergeFrom(other);
  265. return this;
  266. }
  267. }
  268. public Builder mergeFrom(crosby.binary.Fileformat.Blob other) {
  269. if (other == crosby.binary.Fileformat.Blob.getDefaultInstance()) return this;
  270. if (other.hasRaw()) {
  271. setRaw(other.getRaw());
  272. }
  273. if (other.hasRawSize()) {
  274. setRawSize(other.getRawSize());
  275. }
  276. if (other.hasZlibData()) {
  277. setZlibData(other.getZlibData());
  278. }
  279. if (other.hasLzmaData()) {
  280. setLzmaData(other.getLzmaData());
  281. }
  282. if (other.hasBzip2Data()) {
  283. setBzip2Data(other.getBzip2Data());
  284. }
  285. this.mergeUnknownFields(other.getUnknownFields());
  286. return this;
  287. }
  288. @Override
  289. public Builder mergeFrom(
  290. com.google.protobuf.CodedInputStream input,
  291. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  292. throws java.io.IOException {
  293. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  294. com.google.protobuf.UnknownFieldSet.newBuilder(
  295. this.getUnknownFields());
  296. while (true) {
  297. int tag = input.readTag();
  298. switch (tag) {
  299. case 0:
  300. this.setUnknownFields(unknownFields.build());
  301. return this;
  302. default: {
  303. if (!parseUnknownField(input, unknownFields,
  304. extensionRegistry, tag)) {
  305. this.setUnknownFields(unknownFields.build());
  306. return this;
  307. }
  308. break;
  309. }
  310. case 10: {
  311. setRaw(input.readBytes());
  312. break;
  313. }
  314. case 16: {
  315. setRawSize(input.readInt32());
  316. break;
  317. }
  318. case 26: {
  319. setZlibData(input.readBytes());
  320. break;
  321. }
  322. case 34: {
  323. setLzmaData(input.readBytes());
  324. break;
  325. }
  326. case 42: {
  327. setBzip2Data(input.readBytes());
  328. break;
  329. }
  330. }
  331. }
  332. }
  333. // optional bytes raw = 1;
  334. public boolean hasRaw() {
  335. return result.hasRaw();
  336. }
  337. public com.google.protobuf.ByteString getRaw() {
  338. return result.getRaw();
  339. }
  340. public Builder setRaw(com.google.protobuf.ByteString value) {
  341. if (value == null) {
  342. throw new NullPointerException();
  343. }
  344. result.hasRaw = true;
  345. result.raw_ = value;
  346. return this;
  347. }
  348. public Builder clearRaw() {
  349. result.hasRaw = false;
  350. result.raw_ = getDefaultInstance().getRaw();
  351. return this;
  352. }
  353. // optional int32 raw_size = 2;
  354. public boolean hasRawSize() {
  355. return result.hasRawSize();
  356. }
  357. public int getRawSize() {
  358. return result.getRawSize();
  359. }
  360. public Builder setRawSize(int value) {
  361. result.hasRawSize = true;
  362. result.rawSize_ = value;
  363. return this;
  364. }
  365. public Builder clearRawSize() {
  366. result.hasRawSize = false;
  367. result.rawSize_ = 0;
  368. return this;
  369. }
  370. // optional bytes zlib_data = 3;
  371. public boolean hasZlibData() {
  372. return result.hasZlibData();
  373. }
  374. public com.google.protobuf.ByteString getZlibData() {
  375. return result.getZlibData();
  376. }
  377. public Builder setZlibData(com.google.protobuf.ByteString value) {
  378. if (value == null) {
  379. throw new NullPointerException();
  380. }
  381. result.hasZlibData = true;
  382. result.zlibData_ = value;
  383. return this;
  384. }
  385. public Builder clearZlibData() {
  386. result.hasZlibData = false;
  387. result.zlibData_ = getDefaultInstance().getZlibData();
  388. return this;
  389. }
  390. // optional bytes lzma_data = 4;
  391. public boolean hasLzmaData() {
  392. return result.hasLzmaData();
  393. }
  394. public com.google.protobuf.ByteString getLzmaData() {
  395. return result.getLzmaData();
  396. }
  397. public Builder setLzmaData(com.google.protobuf.ByteString value) {
  398. if (value == null) {
  399. throw new NullPointerException();
  400. }
  401. result.hasLzmaData = true;
  402. result.lzmaData_ = value;
  403. return this;
  404. }
  405. public Builder clearLzmaData() {
  406. result.hasLzmaData = false;
  407. result.lzmaData_ = getDefaultInstance().getLzmaData();
  408. return this;
  409. }
  410. // optional bytes bzip2_data = 5;
  411. public boolean hasBzip2Data() {
  412. return result.hasBzip2Data();
  413. }
  414. public com.google.protobuf.ByteString getBzip2Data() {
  415. return result.getBzip2Data();
  416. }
  417. public Builder setBzip2Data(com.google.protobuf.ByteString value) {
  418. if (value == null) {
  419. throw new NullPointerException();
  420. }
  421. result.hasBzip2Data = true;
  422. result.bzip2Data_ = value;
  423. return this;
  424. }
  425. public Builder clearBzip2Data() {
  426. result.hasBzip2Data = false;
  427. result.bzip2Data_ = getDefaultInstance().getBzip2Data();
  428. return this;
  429. }
  430. // @@protoc_insertion_point(builder_scope:Blob)
  431. }
  432. static {
  433. defaultInstance = new Blob(true);
  434. crosby.binary.Fileformat.internalForceInit();
  435. defaultInstance.initFields();
  436. }
  437. // @@protoc_insertion_point(class_scope:Blob)
  438. }
  439. public static final class BlockHeader extends
  440. com.google.protobuf.GeneratedMessage {
  441. // Use BlockHeader.newBuilder() to construct.
  442. private BlockHeader() {
  443. initFields();
  444. }
  445. private BlockHeader(boolean noInit) {}
  446. private static final BlockHeader defaultInstance;
  447. public static BlockHeader getDefaultInstance() {
  448. return defaultInstance;
  449. }
  450. @Override
  451. public BlockHeader getDefaultInstanceForType() {
  452. return defaultInstance;
  453. }
  454. public static final com.google.protobuf.Descriptors.Descriptor
  455. getDescriptor() {
  456. return crosby.binary.Fileformat.internal_static_BlockHeader_descriptor;
  457. }
  458. @Override
  459. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  460. internalGetFieldAccessorTable() {
  461. return crosby.binary.Fileformat.internal_static_BlockHeader_fieldAccessorTable;
  462. }
  463. // required string type = 1;
  464. public static final int TYPE_FIELD_NUMBER = 1;
  465. private boolean hasType;
  466. private java.lang.String type_ = "";
  467. public boolean hasType() { return hasType; }
  468. public java.lang.String getType() { return type_; }
  469. // optional bytes indexdata = 2;
  470. public static final int INDEXDATA_FIELD_NUMBER = 2;
  471. private boolean hasIndexdata;
  472. private com.google.protobuf.ByteString indexdata_ = com.google.protobuf.ByteString.EMPTY;
  473. public boolean hasIndexdata() { return hasIndexdata; }
  474. public com.google.protobuf.ByteString getIndexdata() { return indexdata_; }
  475. // required int32 datasize = 3;
  476. public static final int DATASIZE_FIELD_NUMBER = 3;
  477. private boolean hasDatasize;
  478. private int datasize_ = 0;
  479. public boolean hasDatasize() { return hasDatasize; }
  480. public int getDatasize() { return datasize_; }
  481. private void initFields() {
  482. }
  483. @Override
  484. public final boolean isInitialized() {
  485. if (!hasType) return false;
  486. if (!hasDatasize) return false;
  487. return true;
  488. }
  489. @Override
  490. public void writeTo(com.google.protobuf.CodedOutputStream output)
  491. throws java.io.IOException {
  492. getSerializedSize();
  493. if (hasType()) {
  494. output.writeString(1, getType());
  495. }
  496. if (hasIndexdata()) {
  497. output.writeBytes(2, getIndexdata());
  498. }
  499. if (hasDatasize()) {
  500. output.writeInt32(3, getDatasize());
  501. }
  502. getUnknownFields().writeTo(output);
  503. }
  504. private int memoizedSerializedSize = -1;
  505. @Override
  506. public int getSerializedSize() {
  507. int size = memoizedSerializedSize;
  508. if (size != -1) return size;
  509. size = 0;
  510. if (hasType()) {
  511. size += com.google.protobuf.CodedOutputStream
  512. .computeStringSize(1, getType());
  513. }
  514. if (hasIndexdata()) {
  515. size += com.google.protobuf.CodedOutputStream
  516. .computeBytesSize(2, getIndexdata());
  517. }
  518. if (hasDatasize()) {
  519. size += com.google.protobuf.CodedOutputStream
  520. .computeInt32Size(3, getDatasize());
  521. }
  522. size += getUnknownFields().getSerializedSize();
  523. memoizedSerializedSize = size;
  524. return size;
  525. }
  526. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  527. com.google.protobuf.ByteString data)
  528. throws com.google.protobuf.InvalidProtocolBufferException {
  529. return newBuilder().mergeFrom(data).buildParsed();
  530. }
  531. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  532. com.google.protobuf.ByteString data,
  533. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  534. throws com.google.protobuf.InvalidProtocolBufferException {
  535. return newBuilder().mergeFrom(data, extensionRegistry)
  536. .buildParsed();
  537. }
  538. public static crosby.binary.Fileformat.BlockHeader parseFrom(byte[] data)
  539. throws com.google.protobuf.InvalidProtocolBufferException {
  540. return newBuilder().mergeFrom(data).buildParsed();
  541. }
  542. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  543. byte[] data,
  544. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  545. throws com.google.protobuf.InvalidProtocolBufferException {
  546. return newBuilder().mergeFrom(data, extensionRegistry)
  547. .buildParsed();
  548. }
  549. public static crosby.binary.Fileformat.BlockHeader parseFrom(java.io.InputStream input)
  550. throws java.io.IOException {
  551. return newBuilder().mergeFrom(input).buildParsed();
  552. }
  553. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  554. java.io.InputStream input,
  555. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  556. throws java.io.IOException {
  557. return newBuilder().mergeFrom(input, extensionRegistry)
  558. .buildParsed();
  559. }
  560. public static crosby.binary.Fileformat.BlockHeader parseDelimitedFrom(java.io.InputStream input)
  561. throws java.io.IOException {
  562. Builder builder = newBuilder();
  563. if (builder.mergeDelimitedFrom(input)) {
  564. return builder.buildParsed();
  565. } else {
  566. return null;
  567. }
  568. }
  569. public static crosby.binary.Fileformat.BlockHeader parseDelimitedFrom(
  570. java.io.InputStream input,
  571. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  572. throws java.io.IOException {
  573. Builder builder = newBuilder();
  574. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  575. return builder.buildParsed();
  576. } else {
  577. return null;
  578. }
  579. }
  580. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  581. com.google.protobuf.CodedInputStream input)
  582. throws java.io.IOException {
  583. return newBuilder().mergeFrom(input).buildParsed();
  584. }
  585. public static crosby.binary.Fileformat.BlockHeader parseFrom(
  586. com.google.protobuf.CodedInputStream input,
  587. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  588. throws java.io.IOException {
  589. return newBuilder().mergeFrom(input, extensionRegistry)
  590. .buildParsed();
  591. }
  592. public static Builder newBuilder() { return Builder.create(); }
  593. @Override
  594. public Builder newBuilderForType() { return newBuilder(); }
  595. public static Builder newBuilder(crosby.binary.Fileformat.BlockHeader prototype) {
  596. return newBuilder().mergeFrom(prototype);
  597. }
  598. @Override
  599. public Builder toBuilder() { return newBuilder(this); }
  600. public static final class Builder extends
  601. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  602. private crosby.binary.Fileformat.BlockHeader result;
  603. // Construct using crosby.binary.Fileformat.BlockHeader.newBuilder()
  604. private Builder() {}
  605. private static Builder create() {
  606. Builder builder = new Builder();
  607. builder.result = new crosby.binary.Fileformat.BlockHeader();
  608. return builder;
  609. }
  610. @Override
  611. protected crosby.binary.Fileformat.BlockHeader internalGetResult() {
  612. return result;
  613. }
  614. @Override
  615. public Builder clear() {
  616. if (result == null) {
  617. throw new IllegalStateException(
  618. "Cannot call clear() after build().");
  619. }
  620. result = new crosby.binary.Fileformat.BlockHeader();
  621. return this;
  622. }
  623. @Override
  624. public Builder clone() {
  625. return create().mergeFrom(result);
  626. }
  627. @Override
  628. public com.google.protobuf.Descriptors.Descriptor
  629. getDescriptorForType() {
  630. return crosby.binary.Fileformat.BlockHeader.getDescriptor();
  631. }
  632. @Override
  633. public crosby.binary.Fileformat.BlockHeader getDefaultInstanceForType() {
  634. return crosby.binary.Fileformat.BlockHeader.getDefaultInstance();
  635. }
  636. @Override
  637. public boolean isInitialized() {
  638. return result.isInitialized();
  639. }
  640. @Override
  641. public crosby.binary.Fileformat.BlockHeader build() {
  642. if (result != null && !isInitialized()) {
  643. throw newUninitializedMessageException(result);
  644. }
  645. return buildPartial();
  646. }
  647. private crosby.binary.Fileformat.BlockHeader buildParsed()
  648. throws com.google.protobuf.InvalidProtocolBufferException {
  649. if (!isInitialized()) {
  650. throw newUninitializedMessageException(
  651. result).asInvalidProtocolBufferException();
  652. }
  653. return buildPartial();
  654. }
  655. @Override
  656. public crosby.binary.Fileformat.BlockHeader buildPartial() {
  657. if (result == null) {
  658. throw new IllegalStateException(
  659. "build() has already been called on this Builder.");
  660. }
  661. crosby.binary.Fileformat.BlockHeader returnMe = result;
  662. result = null;
  663. return returnMe;
  664. }
  665. @Override
  666. public Builder mergeFrom(com.google.protobuf.Message other) {
  667. if (other instanceof crosby.binary.Fileformat.BlockHeader) {
  668. return mergeFrom((crosby.binary.Fileformat.BlockHeader)other);
  669. } else {
  670. super.mergeFrom(other);
  671. return this;
  672. }
  673. }
  674. public Builder mergeFrom(crosby.binary.Fileformat.BlockHeader other) {
  675. if (other == crosby.binary.Fileformat.BlockHeader.getDefaultInstance()) return this;
  676. if (other.hasType()) {
  677. setType(other.getType());
  678. }
  679. if (other.hasIndexdata()) {
  680. setIndexdata(other.getIndexdata());
  681. }
  682. if (other.hasDatasize()) {
  683. setDatasize(other.getDatasize());
  684. }
  685. this.mergeUnknownFields(other.getUnknownFields());
  686. return this;
  687. }
  688. @Override
  689. public Builder mergeFrom(
  690. com.google.protobuf.CodedInputStream input,
  691. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  692. throws java.io.IOException {
  693. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  694. com.google.protobuf.UnknownFieldSet.newBuilder(
  695. this.getUnknownFields());
  696. while (true) {
  697. int tag = input.readTag();
  698. switch (tag) {
  699. case 0:
  700. this.setUnknownFields(unknownFields.build());
  701. return this;
  702. default: {
  703. if (!parseUnknownField(input, unknownFields,
  704. extensionRegistry, tag)) {
  705. this.setUnknownFields(unknownFields.build());
  706. return this;
  707. }
  708. break;
  709. }
  710. case 10: {
  711. setType(input.readString());
  712. break;
  713. }
  714. case 18: {
  715. setIndexdata(input.readBytes());
  716. break;
  717. }
  718. case 24: {
  719. setDatasize(input.readInt32());
  720. break;
  721. }
  722. }
  723. }
  724. }
  725. // required string type = 1;
  726. public boolean hasType() {
  727. return result.hasType();
  728. }
  729. public java.lang.String getType() {
  730. return result.getType();
  731. }
  732. public Builder setType(java.lang.String value) {
  733. if (value == null) {
  734. throw new NullPointerException();
  735. }
  736. result.hasType = true;
  737. result.type_ = value;
  738. return this;
  739. }
  740. public Builder clearType() {
  741. result.hasType = false;
  742. result.type_ = getDefaultInstance().getType();
  743. return this;
  744. }
  745. // optional bytes indexdata = 2;
  746. public boolean hasIndexdata() {
  747. return result.hasIndexdata();
  748. }
  749. public com.google.protobuf.ByteString getIndexdata() {
  750. return result.getIndexdata();
  751. }
  752. public Builder setIndexdata(com.google.protobuf.ByteString value) {
  753. if (value == null) {
  754. throw new NullPointerException();
  755. }
  756. result.hasIndexdata = true;
  757. result.indexdata_ = value;
  758. return this;
  759. }
  760. public Builder clearIndexdata() {
  761. result.hasIndexdata = false;
  762. result.indexdata_ = getDefaultInstance().getIndexdata();
  763. return this;
  764. }
  765. // required int32 datasize = 3;
  766. public boolean hasDatasize() {
  767. return result.hasDatasize();
  768. }
  769. public int getDatasize() {
  770. return result.getDatasize();
  771. }
  772. public Builder setDatasize(int value) {
  773. result.hasDatasize = true;
  774. result.datasize_ = value;
  775. return this;
  776. }
  777. public Builder clearDatasize() {
  778. result.hasDatasize = false;
  779. result.datasize_ = 0;
  780. return this;
  781. }
  782. // @@protoc_insertion_point(builder_scope:BlockHeader)
  783. }
  784. static {
  785. defaultInstance = new BlockHeader(true);
  786. crosby.binary.Fileformat.internalForceInit();
  787. defaultInstance.initFields();
  788. }
  789. // @@protoc_insertion_point(class_scope:BlockHeader)
  790. }
  791. private static com.google.protobuf.Descriptors.Descriptor
  792. internal_static_Blob_descriptor;
  793. private static
  794. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  795. internal_static_Blob_fieldAccessorTable;
  796. private static com.google.protobuf.Descriptors.Descriptor
  797. internal_static_BlockHeader_descriptor;
  798. private static
  799. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  800. internal_static_BlockHeader_fieldAccessorTable;
  801. public static com.google.protobuf.Descriptors.FileDescriptor
  802. getDescriptor() {
  803. return descriptor;
  804. }
  805. private static com.google.protobuf.Descriptors.FileDescriptor
  806. descriptor;
  807. static {
  808. java.lang.String[] descriptorData = {
  809. "\n\020fileformat.proto\"_\n\004Blob\022\013\n\003raw\030\001 \001(\014\022" +
  810. "\020\n\010raw_size\030\002 \001(\005\022\021\n\tzlib_data\030\003 \001(\014\022\021\n\t" +
  811. "lzma_data\030\004 \001(\014\022\022\n\nbzip2_data\030\005 \001(\014\"@\n\013B" +
  812. "lockHeader\022\014\n\004type\030\001 \002(\t\022\021\n\tindexdata\030\002 " +
  813. "\001(\014\022\020\n\010datasize\030\003 \002(\005B\017\n\rcrosby.binary"
  814. };
  815. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  816. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  817. @Override
  818. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  819. com.google.protobuf.Descriptors.FileDescriptor root) {
  820. descriptor = root;
  821. internal_static_Blob_descriptor =
  822. getDescriptor().getMessageTypes().get(0);
  823. internal_static_Blob_fieldAccessorTable = new
  824. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  825. internal_static_Blob_descriptor,
  826. new java.lang.String[] { "Raw", "RawSize", "ZlibData", "LzmaData", "Bzip2Data", },
  827. crosby.binary.Fileformat.Blob.class,
  828. crosby.binary.Fileformat.Blob.Builder.class);
  829. internal_static_BlockHeader_descriptor =
  830. getDescriptor().getMessageTypes().get(1);
  831. internal_static_BlockHeader_fieldAccessorTable = new
  832. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  833. internal_static_BlockHeader_descriptor,
  834. new java.lang.String[] { "Type", "Indexdata", "Datasize", },
  835. crosby.binary.Fileformat.BlockHeader.class,
  836. crosby.binary.Fileformat.BlockHeader.Builder.class);
  837. return null;
  838. }
  839. };
  840. com.google.protobuf.Descriptors.FileDescriptor
  841. .internalBuildGeneratedFileFrom(descriptorData,
  842. new com.google.protobuf.Descriptors.FileDescriptor[] {
  843. }, assigner);
  844. }
  845. public static void internalForceInit() {}
  846. // @@protoc_insertion_point(outer_class_scope)
  847. }