Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 package com.axml.enddec; | 1 package com.axml.enddec; |
| 2 | 2 |
| 3 import java.io.FileInputStream; | 3 import java.io.FileInputStream; |
| 4 import java.io.FileOutputStream; | 4 import java.io.FileOutputStream; |
| 5 import java.io.IOException; | 5 import java.io.IOException; |
| 6 import java.io.OutputStream; | 6 import java.io.OutputStream; |
| 7 import java.io.UnsupportedEncodingException; | 7 import java.io.UnsupportedEncodingException; |
| 8 import java.net.URL; | 8 import java.net.URL; |
| 9 import java.util.LinkedList; | 9 import java.util.LinkedList; |
| 10 import java.util.Vector; | 10 import java.util.Vector; |
| 11 | 11 |
| 12 public class BinaryXMLParser implements BinaryXML { | 12 public class BinaryXMLParser implements BinaryXML { |
| 13 private XMLChunk xml; | 13 private final XMLChunk xml; |
| 14 private byte[] buf; | 14 private final byte[] buf; |
|
Xi Han
2016/04/15 14:46:49
Do we need these changes?
Yaron
2016/04/15 15:46:58
done automatically by eclipse. I tend to let it do
| |
| 15 public BinaryXMLParser(String filePath) throws IOException { | 15 public BinaryXMLParser(String filePath) throws IOException { |
| 16 FileInputStream is = new FileInputStream(filePath); | 16 FileInputStream is = new FileInputStream(filePath); |
| 17 | 17 |
| 18 xml = new XMLChunk(); | 18 xml = new XMLChunk(); |
| 19 | 19 |
| 20 buf = new byte[10240]; | 20 buf = new byte[10240]; |
| 21 is.read(buf); | 21 is.read(buf); |
| 22 is.close(); | 22 is.close(); |
| 23 } | 23 } |
| 24 | 24 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 | 373 |
| 374 @Override | 374 @Override |
| 375 public int getScope() { | 375 public int getScope() { |
| 376 return this.getMetaDataValue("meta-data", "scope"); | 376 return this.getMetaDataValue("meta-data", "scope"); |
| 377 } | 377 } |
| 378 | 378 |
| 379 @Override | 379 @Override |
| 380 public int getMac() { | 380 public int getMac() { |
| 381 return this.getMetaDataValue("meta-data", "mac"); | 381 return this.getMetaDataValue("meta-data", "mac"); |
| 382 } | 382 } |
| 383 | |
| 384 @Override | |
| 385 public int getRuntimeHost() { | |
| 386 return this.getMetaDataValue("meta-data", "runtimeHost"); | |
| 387 } | |
| 383 } | 388 } |
| OLD | NEW |