Package net.sf.cram

Examples of net.sf.cram.EncodingKey


      for (EncodingKey key : EncodingKey.values())
        eMap.put(key, NullEncoding.toParam());

      for (int i = 0; i < mapSize; i++) {
        String key = new String(new byte[] { buf.get(), buf.get() });
        EncodingKey eKey = EncodingKey.byFirstTwoChars(key);
        if (eKey == null)
          throw new RuntimeException("Unknown encoding key: " + key);

        EncodingID id = EncodingID.values()[buf.get()];
        int paramLen = ByteBufferUtils.readUnsignedITF8(buf);
        byte[] paramBytes = new byte[paramLen];
        buf.get(paramBytes);

        eMap.put(eKey, new EncodingParams(id, paramBytes));

        log.debug(String.format("FOUND ENCODING: %s, %s, %s.",
            eKey.name(), id.name(),
            Arrays.toString(Arrays.copyOf(paramBytes, 20))));
      }
    }

    { // tag encoding map:
View Full Code Here


    writer.AP_delta = h.AP_seriesDelta ;

    for (Field f : writer.getClass().getFields()) {
      if (f.isAnnotationPresent(DataSeries.class)) {
        DataSeries ds = f.getAnnotation(DataSeries.class);
        EncodingKey key = ds.key();
        DataSeriesType type = ds.type();
       
        f.set(writer,
            createWriter(type, h.eMap.get(key), bos, outputMap));
      }
View Full Code Here

      if (f.isAnnotationPresent(DataSeries.class)) {
        // debug hook:
        // if (f.getName().equals("fc"))
        // System.out.println("qwe");
        DataSeries ds = f.getAnnotation(DataSeries.class);
        EncodingKey key = ds.key();
        DataSeriesType type = ds.type();
        if (h.eMap.get(key) == null) {
          System.err.println("Encoding not found for key: " + key);
        }
        f.set(reader,
View Full Code Here

    if (!collectStats) return map ;

    for (Field f : reader.getClass().getFields()) {
      if (f.isAnnotationPresent(DataSeries.class)) {
        DataSeries ds = f.getAnnotation(DataSeries.class);
        EncodingKey key = ds.key();
        DataSeriesType type = ds.type();
        map.put(key.name(), (DataReaderWithStats) f.get(reader));
      }

      if (f.isAnnotationPresent(DataSeriesMap.class)) {
        DataSeriesMap dsm = f.getAnnotation(DataSeriesMap.class);
        String name = dsm.name();
View Full Code Here

TOP

Related Classes of net.sf.cram.EncodingKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.