Package net.sf.cram

Examples of net.sf.cram.ReadTag


    for (String nameAndType : tagNameAndTypes) {
      BitCodec<byte[]> tagCodec = bitCodecFactory
          .buildByteArrayCodec(tagStubs.get(nameAndType));
      tagCodecs.add(tagCodec);

      ReadTag tag = ReadTag.deriveTypeFromKeyAndType(nameAndType, null);
      tag.setIndex(i);
      tags[i] = tag;
      i++;
    }

    ReadTagCollectionCodec codec = new ReadTagCollectionCodec();
View Full Code Here


      while (bis.readBit()) {
        if (foundTags == null)
          foundTags = new ArrayList<ReadTag>();

        int index = 0xFF & tagKeyCodec.read(bis);
        ReadTag tag = tags[index];
        String tagKeyAndType = tag.getKeyAndType();
        BitCodec<byte[]> codec = tagCodecs.get(index);

        byte[] valueBytes = codec.read(bis);
        char type = tagKeyAndType.charAt(3);
        Object value = ReadTag.restoreValueFromByteArray(type,
            valueBytes);

        ReadTag foundTag = new ReadTag(tagKeyAndType.substring(0, 2),
            type, value);
        foundTags.add(foundTag);
      }
      return foundTags;
    }
View Full Code Here

      BitCodec<byte[]> codec = valueCodecMap.get(tagKeyAndType);
      byte[] valueBytes = codec.read(bis);
      char type = tagKeyAndType.charAt(3);
      Object value = ReadTag.restoreValueFromByteArray(type, valueBytes);

      ReadTag tag = new ReadTag(tagKeyAndType.substring(0, 2), type, value);
      tags.add(tag);
    }
    return tags;
  }
View Full Code Here

          try {
            data = dataReader.readData();
          } catch (EOFException e) {
            throw e;
          }
          ReadTag tag = new ReadTag(id, data);
          r.tags[i] = tag;
        }
      }

      if (!r.segmentUnmapped) {
View Full Code Here

TOP

Related Classes of net.sf.cram.ReadTag

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.