Examples of MappedFile


Examples of ar.util.memoryMapping.MappedFile

   
    long offset = recordOffset(low)+buffer.filePosition();
    long end = Math.min(recordOffset(high)+buffer.filePosition(), source.length());
   
    try {
      MappedFile mf = MappedFile.Util.make(source, FileChannel.MapMode.READ_ONLY, BUFFER_BYTES, offset, end);
      if (mf == null) {return new GlyphList<>();}
     
      mf.order(buffer.order());
      return new MemMapList<>(mf, source, shaper, valuer, types, 0);
    } catch (Exception e) {
      throw new RuntimeException(String.format("Error segmenting glyphset (parameters %d, %d)", count, segId), e);
    }
  }
View Full Code Here

Examples of util.MappedFile

        long requestedCapacity = configuration.getCapacity();
        long desiredSegmentSize = configuration.getSegmentSize();
        int segmentCount = calculateSegmentCount(requestedCapacity, desiredSegmentSize);
        long segmentSize = (requestedCapacity / segmentCount + 31) & ~31L;

        this.mmap = new MappedFile(configuration.getImageFile(), segmentSize * segmentCount);
        this.segmentSize = (int) segmentSize;
        this.segmentMask = segmentCount - 1;
        this.segments = new Segment[segmentCount];

        for (int i = 0; i < segmentCount; i++) {
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.