Examples of Pointer


Examples of net.didion.jwnl.data.Pointer

          synsetVerbFrameStmt.execute();
        }

      }

      Pointer pointers[] = synset.getPointers();
      synsetPointerStmt.setInt(2, id);
      int i = 0;
      while (i < pointers.length) {
        synsetPointerStmt.setInt(1, nextId());
        synsetPointerStmt.setString(3, pointers[i].getType().getKey());
View Full Code Here

Examples of org.apache.commons.jxpath.Pointer

            String expectedSignature, String expectedValueSignature)
    {
        Object value = context.getValue(path);
        assertEquals("Checking value: " + path, expectedValue, value);

        Pointer pointer = context.getPointer(path);
        assertEquals("Checking pointer: " + path,
                expectedPath, pointer.toString());

        assertEquals("Checking signature: " + path,
                expectedSignature, pointerSignature(pointer));
       
        Pointer vPointer = ((NodePointer) pointer).getValuePointer();
        assertEquals("Checking value pointer signature: " + path,
                expectedValueSignature, pointerSignature(vPointer));
    }
View Full Code Here

Examples of org.apache.directmemory.memory.Pointer

        String obj = "Simple String Object";
        Cache.init( 1, Ram.Mb( 16 ) );
        Cache.scheduleDisposalEvery( Every.seconds( 1 ) );
        Cache.dump();

        Pointer p = Cache.put( "1", obj );
        Object result = Cache.retrieve( "1" );

        Cache.dump();
        Monitor.dump( "cache" );
View Full Code Here

Examples of org.apache.poi.hdgf.pointers.Pointer

    System.err.println("Trailer has length " + trailerPointer.getLength());
    System.err.println("Trailer has format " + trailerPointer.getFormat());

    for(int i=0; i<trailer.getPointedToStreams().length; i++) {
      Stream stream = trailer.getPointedToStreams()[i];
      Pointer ptr = stream.getPointer();

      System.err.println("Looking at pointer " + i);
      System.err.println("\tType is " + ptr.getType() + "\t\t" + Integer.toHexString(ptr.getType()));
      System.err.println("\tOffset is " + ptr.getOffset() + "\t\t" + Long.toHexString(ptr.getOffset()));
      System.err.println("\tAddress is " + ptr.getAddress() + "\t" + Long.toHexString(ptr.getAddress()));
      System.err.println("\tLength is " + ptr.getLength() + "\t\t" + Long.toHexString(ptr.getLength()));
      System.err.println("\tFormat is " + ptr.getFormat() + "\t\t" + Long.toHexString(ptr.getFormat()));
      System.err.println("\tCompressed is " + ptr.destinationCompressed());
      System.err.println("\tStream is " + stream.getClass());

      if(stream instanceof PointerContainingStream) {
        PointerContainingStream pcs = (PointerContainingStream)stream;

        if(pcs.getPointedToStreams() != null && pcs.getPointedToStreams().length > 0) {
          System.err.println("\tContains " + pcs.getPointedToStreams().length + " other pointers/streams");
          for(int j=0; j<pcs.getPointedToStreams().length; j++) {
            Stream ss = pcs.getPointedToStreams()[j];
            Pointer sptr = ss.getPointer();
            System.err.println("\t\t" + j + " - Type is " + sptr.getType() + "\t\t" + Integer.toHexString(sptr.getType()));
            System.err.println("\t\t" + j + " - Length is " + sptr.getLength() + "\t\t" + Long.toHexString(sptr.getLength()));
          }
        }
      }

      if(stream instanceof StringsStream) {
View Full Code Here

Examples of org.bridj.Pointer

      return false;
    allocateCompressedBuffer((int) (1.5 * p8BitImageByteBuffer.limit()));
    final StopWatch lCompressionTime = StopWatch.start();
    p8BitImageByteBuffer.position(0);

    final Pointer lPointerTo8BitImageByteBuffer = Pointer.pointerToBytes(p8BitImageByteBuffer);

    final int lErrorCode = TurbojpegLibrary.tjCompress2(mPointerToCompressor,
                                                        lPointerTo8BitImageByteBuffer,
                                                        pWidth,
                                                        0,
                                                        pHeight,
                                                        (int) TJPF.TJPF_GRAY.value,
                                                        mPointerToCompressedImageByteBufferPointer,
                                                        mPointerToCompressedBufferEffectiveSize,
                                                        (int) TJSAMP.TJSAMP_GRAY.value,
                                                        mQuality,
                                                        TurbojpegLibrary.TJFLAG_NOREALLOC | TurbojpegLibrary.TJFLAG_FORCESSE3
                                                            | TurbojpegLibrary.TJFLAG_FASTDCT);
    mLastCompressionElapsedTimeInMs = lCompressionTime.time(TimeUnit.MILLISECONDS);
    mCompressedImageByteBuffer.limit((int) mPointerToCompressedBufferEffectiveSize.getCLong());
    mLastCompressionRatio = ((double) mCompressedImageByteBuffer.limit()) / p8BitImageByteBuffer.limit();

    lPointerTo8BitImageByteBuffer.release();
    return lErrorCode == 0;

  }
View Full Code Here

Examples of org.directmemory.memory.Pointer

 
  @BenchmarkOptions(benchmarkRounds = 1000000, warmupRounds=0, concurrency=100)
    @Test
    public void retrieveCatchThemAll() {
      String key = "test-" + (rndGen.nextInt(entries)+1);
      Pointer p = map.get(key);
    read.incrementAndGet();
      if (p != null) {
        got.incrementAndGet();
        byte [] payload = mem.retrieve(p);
          if (key.equals(new String(payload)))
View Full Code Here

Examples of org.jocl.Pointer

     * @throws IllegalArgumentException If the given buffer
     * is null or is neither direct nor has a backing array
     */
    private static Pointer computePointer(ByteBuffer buffer)
    {
        Pointer result = null;
        if (buffer.isDirect())
        {
            int oldPosition = buffer.position();
            buffer.position(0);
            result = Pointer.to(buffer.slice()).withByteOffset(
View Full Code Here

Examples of org.jruby.ext.ffi.Pointer

        static final long ADDRESS_MASK = Platform.getPlatform().addressSize() == 32
                ? 0xffffffffL : 0xffffffffffffffffL;
        public static final IntResultConverter INSTANCE = new PointerResultConverter();
        public final IRubyObject fromNative(ThreadContext context, int value) {
            final long address = ((long) value) & ADDRESS_MASK;
            return new Pointer(context.getRuntime(), NativeMemoryIO.wrap(context.getRuntime(), address));
        }
View Full Code Here

Examples of org.terrier.structures.Pointer

      String term1;
      String term2;

      int termId = 0;
     
      Pointer p = new SimpleBitIndexPointer();
   
      hasMore1 = lexInStream1.hasNext();
      hasMore2 = lexInStream2.hasNext();
      Map.Entry<String,LexiconEntry> lee1 = lexInStream1.next();
      Map.Entry<String,LexiconEntry> lee2 = lexInStream2.next();
View Full Code Here

Examples of org.wijiscommons.ssaf.schema.search.Pointer

    // Iterate through file paths
        for (String filePath : filePaths)
    {
       
      // Get Pointer Object from filePath
      Pointer pointer = validateXML(filePath);
      pointerList.add(pointer);
     
      // If the size of pointerList is equal to commit size then
      // add the list of documents to Solr
      // else just add to pointerList until the count reaches commit size
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.