Package org.apache.uima.cas

Examples of org.apache.uima.cas.ByteArrayFS


     *          value of the byte array as a hex string
     * @return
     */
    private int createByteArray(String hexString, int xmiId) {
      int arrayLen = hexString.length() / 2;
      ByteArrayFS fs = casBeingFilled.createByteArrayFS(arrayLen);
      for (int i = 0; i < arrayLen; i++) {
        byte high = hexCharToByte(hexString.charAt(i * 2));
        byte low = hexCharToByte(hexString.charAt(i * 2 + 1));
        byte b = (byte) ((high << 4) | low);
        fs.set(i, b);
      }

      int arrayAddr = ((FeatureStructureImpl) fs).getAddress();
      deserializedFsAddrs.add(arrayAddr);
      addFsAddrXmiIdMapping(arrayAddr, xmiId);
View Full Code Here

TOP

Related Classes of org.apache.uima.cas.ByteArrayFS

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.