Examples of BitMap


Examples of org.chaidb.db.helper.BitMap

    }

    // for backup use
    public BTreeChanges(String btreename) throws ChaiDBException {
        bitMaps = new LinkedHashMap(1);
        BitMap bitMap = new BitMap(INIT_CAP);
        bitMaps.put(new Integer(0), bitMap);
        this.btreepath = btreename;
        trackName = btreename + EXT;
        reading = true;
View Full Code Here

Examples of org.chaidb.db.helper.BitMap

        }
        PageNumber pno = (PageNumber) change;
        if (pno.getTreeId() != treeid) {
            return;
        }
        BitMap bm;
        Integer pageInFile = new Integer(pno.getFileNumber());
        bm = (BitMap) bitMaps.get(pageInFile);
        if (bm == null) {
            bm = new BitMap(INIT_CAP);
            bitMaps.put(pageInFile, bm);
        }
        bm.set(pno.getPageInFile());
    }
View Full Code Here

Examples of org.chaidb.db.helper.BitMap

                        } else { // init a track file, write treeid
                            raf.seek(TREEID_OFF);
                            raf.writeInt(this.treeid);
                        }

                        BitMap bm = (BitMap) bitMaps.get(new Integer(0));
                        long len = f.length() - DATA_OFF;
                        if (len > 0x10000) {
                            len -= 0x10000;
                        }
                        bm.read(raf, (int) len);
                        return;
                    }
                }
            }
        } finally {
View Full Code Here

Examples of org.chaidb.db.helper.BitMap

    }

    private void readAFile(int pageInFile, RandomAccessFile raf) throws IOException {
        raf.seek(DATA_OFF + MAX_BITMAP_SIZE * pageInFile);
        Integer fnum = new Integer(pageInFile);
        BitMap bm = (BitMap) bitMaps.get(fnum);
        if (bm == null) {
            bm = new BitMap(INIT_CAP);
        }
        bm.read(raf);
    }
View Full Code Here

Examples of org.eclipse.jgit.lib.BitmapIndex.Bitmap

      throws MissingObjectException, IncorrectObjectTypeException,
      IOException {
    final BitmapBuilder bitmapResult = bitmapIndex.newBitmapBuilder();

    for (ObjectId obj : start) {
      Bitmap bitmap = bitmapIndex.getBitmap(obj);
      if (bitmap != null)
        bitmapResult.or(bitmap);
    }

    boolean marked = false;
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.BitMap

  iconPMap.pixelSize = (short)bpp;
  iconPMap.pixelFormat = (short)bpp;
  OS.memcpy(iconPtr[0], iconPMap, PixMap.sizeof);

  /* Initialize the mask */
  BitMap iconMask = new BitMap();
  iconMask.rowBytes = (short)maskBpl;
  iconMask.right = (short)width;
  iconMask.bottom = (short)height;
  OS.memcpy(iconPtr[0] + PixMap.sizeof, iconMask, BitMap.sizeof);

View Full Code Here

Examples of org.eclipse.swt.internal.win32.BITMAP

      alpha = data.alpha;
      alphaData = data.alphaData;
      transparentPixel = data.transparentPixel;
      break;
    }
    BITMAP bm = new BITMAP();
    Extension.GetObject(hBitmap, BITMAP.sizeof, bm);
    int imgWidth = bm.bmWidth;
    int imgHeight = bm.bmHeight;
    int /* long */hDC = Extension.GetDC(0);
    int /* long */srcHdc = Extension.CreateCompatibleDC(hDC);
    int /* long */oldSrcBitmap = Extension.SelectObject(srcHdc, hBitmap);
    int /* long */memHdc = Extension.CreateCompatibleDC(hDC);
    BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
    bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
    bmiHeader.biWidth = imgWidth;
    bmiHeader.biHeight = -imgHeight;
    bmiHeader.biPlanes = 1;
    bmiHeader.biBitCount = (short) 32;
    bmiHeader.biCompression = Extension.BI_RGB;
    byte[] bmi = new byte[BITMAPINFOHEADER.sizeof];
    Extension.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
    int /* long */[] pBits = new int /* long */[1];
    int /* long */memDib = Extension.CreateDIBSection(0, bmi, Extension.DIB_RGB_COLORS,
        pBits, 0, 0);
    if (memDib == 0)
      SWT.error(SWT.ERROR_NO_HANDLES);
    int /* long */oldMemBitmap = Extension.SelectObject(memHdc, memDib);
    BITMAP dibBM = new BITMAP();
    Extension.GetObject(memDib, BITMAP.sizeof, dibBM);
    int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
    Extension.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, Extension.SRCCOPY);
    byte red = 0, green = 0, blue = 0;
    if (transparentPixel != -1) {
View Full Code Here

Examples of org.hsqldb.map.BitMap

    public static BitMap sqlBitStringToBitMap(String s) throws IOException {

        int    l = s.length();
        int    n;
        int    bitIndex = 0;
        BitMap map      = new BitMap(l, true);

        for (int j = 0; j < l; j++) {
            char c = s.charAt(j);

            if (c == ' ') {
                continue;
            }

            n = getNibble(c);

            if (n != 0 && n != 1) {
                throw new IOException(
                    "hexadecimal string contains non hex character");    //NOI18N
            }

            if (n == 1) {
                map.set(bitIndex);
            }

            bitIndex++;
        }

        map.setSize(bitIndex);

        return map;
    }
View Full Code Here

Examples of org.hsqldb.map.BitMap

        }
    }

    void scanBitString() {

        BitMap map = new BitMap(32, true);

        while (true) {
            scanBitStringPart(map);

            if (token.isMalformed) {
                return;
            }

            if (scanSeparator() && charAt(currentPosition) == '\'') {
                continue;
            }

            break;
        }

        token.tokenValue = BinaryData.getBitData(map.getBytes(), map.size());
    }
View Full Code Here

Examples of org.hsqldb.map.BitMap

        return data;
    }

    public synchronized BinaryData convertToBit(String s) {

        BitMap map      = new BitMap(32, true);
        int    bitIndex = 0;

        reset(s);
        resetState();
        byteOutputStream.reset(byteBuffer);

        for (; currentPosition < limit; currentPosition++) {
            int c = sqlString.charAt(currentPosition);

            if (c == '0') {
                map.unset(bitIndex);

                bitIndex++;
            } else if (c == '1') {
                map.set(bitIndex);

                bitIndex++;
            } else {
                token.tokenType   = Tokens.X_MALFORMED_BIT_STRING;
                token.isMalformed = true;

                throw Error.error(ErrorCode.X_22018);
            }
        }

        map.setSize(bitIndex);

        return BinaryData.getBitData(map.getBytes(), map.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.