usgs / pdl

Product Distribution Layer
Other
9 stars 17 forks source link

Check quakeml file lengths #94

Closed jmfee-usgs closed 5 years ago

jmfee-usgs commented 5 years ago

Related to this java bug report: https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8222187

Files that are exactly (X*4096 + 1) bytes long, trigger this bug when using a buffer size of 4096... Check for a file that is this long and pad with one extra space before processing.

jmfee-usgs commented 5 years ago

Another solution is to use a buffer size of 1, which may impact performance

Capprin commented 5 years ago

The EIDS input wedge reads quakeml files and needs to check the file length before converting into a product. It should be an option that people enable, but if the file is of the aforementioned length, one space should be added before processing to avoid this bug.