View Javadoc

1   package org.catacomb.dataview.read;
2   
3   import org.catacomb.report.E;
4   
5   
6   import java.io.ByteArrayInputStream;
7   import java.io.InputStream;
8   
9   
10  public class NumericContentReader extends BaseContentReader {
11  
12      byte[] bytes;
13  
14  
15      public NumericContentReader(byte[] ba, FUImportContext ctxt) {
16          super(ctxt);
17          bytes = ba;
18      }
19  
20  
21      public Object getMain() {
22          Object ret = null;
23          try {
24              InputStream bais = new ByteArrayInputStream(bytes);
25              ret = NumericDataRW.read(bais);
26  
27          } catch (Exception ex) {
28              E.error("num binary read exception " + ex);
29          }
30          return ret;
31      }
32  
33  
34  
35  }
36