Examples of ByteArray


Examples of org.exist.util.ByteArray

        assertEquals(groupId2, permission.getACEId(1));
        assertEquals(ACE_TARGET.GROUP, permission.getACETarget(1));
        assertEquals(mode2, permission.getACEMode(1));
       
        //get the written acl data
        ByteArray buf = os.data();
        byte data[] = new byte[buf.size()];
        buf.copyTo(data, 0);
       
       
        //create a new permission instance
        SimpleACLPermission permission2 = new SimpleACLPermission(mockSecurityManager);
       
View Full Code Here

Examples of org.jbpm.bytes.ByteArray

  public boolean supports(Object value) {
    return value instanceof byte[];
  }

  public ByteArray convert(byte[] o) {
    return new ByteArray(o);
  }
View Full Code Here

Examples of org.lilyproject.bytes.api.ByteArray

        }
        return value;
    }

    private ByteArray generateByteArray() {
        ByteArray value = null;
        // Default
        if (properties == null) {
            byte[] bytes = new byte[random.nextInt(100)];
            random.nextBytes(bytes);
            value = new ByteArray(bytes);
        } else {
            int length = JsonUtil.getInt(properties, "length", 100);
            byte[] bytes = new byte[length];
            random.nextBytes(bytes);
            value = new ByteArray(bytes);
        }
        return value;
    }
View Full Code Here

Examples of org.pdfclown.util.ByteArray

      int codeBufferSize = 1;
      while(position < codeLength)
      {
        byte[] codeBuffer = codeBuffers[codeBufferSize];
        System.arraycopy(code,position,codeBuffer,0,codeBufferSize);
        Integer textChar = codes.get(new ByteArray(codeBuffer));
        if(textChar == null)
        {
          if(codeBufferSize < charCodeMaxLength)
          {
            codeBufferSize++;
View Full Code Here

Examples of org.pdfclown.util.ByteArray

    {
      if(differenceObject instanceof PdfInteger)
      {charCodeData[0] = (byte)((((PdfInteger)differenceObject).getValue().intValue()) & 0xFF);} //TODO:verify whether it can be directly cast to byte (.byteValue())!
      else // NOTE: MUST be PdfName.
      {
        ByteArray charCode = new ByteArray(charCodeData);
        String charName = (String)((PdfName)differenceObject).getValue();
        if(charName.equals(".notdef"))
        {codes.remove(charCode);}
        else
        {
View Full Code Here

Examples of org.pdfclown.util.ByteArray

    {
      glyphWidths = new Hashtable<Integer,Integer>();
      PdfArray glyphWidthObjects = (PdfArray)getBaseDataObject().resolve(PdfName.Widths);
      if(glyphWidthObjects != null)
      {
        ByteArray charCode = new ByteArray(
          new byte[]
          {(byte)(int)((PdfInteger)getBaseDataObject().get(PdfName.FirstChar)).getRawValue()}
          );
        for(PdfDirectObject glyphWidthObject : glyphWidthObjects)
        {
View Full Code Here

Examples of org.pdfclown.util.ByteArray

    {
      Map<ByteArray,Integer> codes = new Hashtable<ByteArray,Integer>();
      for(Map.Entry<Integer,Integer> glyphIndexEntry : glyphIndexes.entrySet())
      {
        codes.put(
          new ByteArray(new byte[]{ConvertUtils.intToByteArray(glyphIndexEntry.getValue())[3]}),
          glyphIndexEntry.getKey()
          );
      }
      return codes;
    }
View Full Code Here

Examples of org.pdfclown.util.ByteArray

        : new byte[]
          {
            (byte)((code >> 8) & 0xFF),
            (byte)(code & 0xFF)
          });
      codes.put(new ByteArray(charCode),glyphIndexEntry.getKey());

      // CMap entry.
      cmapBuffer.append("<");
      toUnicodeBuffer.append("<");
      for(int charCodeBytesIndex = 0,
View Full Code Here

Examples of org.pdfclown.util.ByteArray

            if(!encodingLineMatcher.find())
              break;

            byte[] inputCode = new byte[]{(byte)Integer.parseInt(encodingLineMatcher.group(1))};
            String name = encodingLineMatcher.group(2).substring(1);
            codes.put(new ByteArray(inputCode),GlyphMapping.nameToCode(name));
          }
          break;
        }
      }
    }
View Full Code Here

Examples of org.pdfclown.util.ByteArray

  // <protected>
  protected void put(
    int charCode,
    String charName
    )
  {codes.put(new ByteArray(new byte[]{(byte)charCode}),GlyphMapping.nameToCode(charName));}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.