Android Open Source - RadaeePDF-B4A B M Database






From Project

Back to project page RadaeePDF-B4A.

License

The source code is released under:

Apache License

If you think the Android project RadaeePDF-B4A listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.radaee.pdf;
/**//from ww w.j  a  va  2  s  .c  o m
class for PDF Book-mark database.
@author Radaee
@version 1.1
*/

public class BMDatabase
{
  private static native int openAndCreate( String db_path );
  private static native void close( int db );
  private static native int recOpen( int db, String look_path );
  private static native void recClose( int rec );
  private static native int recGetCount( int rec );
  private static native String recItemGetName( int rec, int index );
  private static native int recItemGetPage( int rec, int index );
  private static native boolean recItemRemove( int rec, int index );
  private static native boolean recItemInsert( int rec, String name, int pageno );
  private int m_hand = 0;
  
  /**
   * open exist database file or create it if not exist. (Database for BookMark)
   * @param db_path
   * @return
   */
  public boolean OpenOrCreate( String db_path )
  {
    m_hand = openAndCreate( db_path );
    return (m_hand != 0);
  }
  /**
   * close database
   */
  public void Close()
  {
    close( m_hand );
    m_hand = 0;
  }
  /**
   * Get a RecordSet handle, by input PDF file path
   * @param look_path PDF path to lookup.
   * @return handle value of RecordSet.
   */
  public int RecOpen( String look_path )
  {
    return recOpen( m_hand, look_path );
  }
  /**
   * Close a RecordSet handle
   * @param rec handle value of RecordSet. obtained by RecOpen
   */
  public void RecClose( int rec )
  {
    recClose( rec );
  }
  /**
   * Get items count of RecordSet.
   * @param rec RecordSet Handle, obtained by RecOpen
   * @return records count
   */
  public int RecGetCount( int rec )
  {
    return recGetCount( rec );
  }
  /**
   * Get item name by index.
   * @param rec RecordSet Handle that returned by RecOpen
   * @param index 0 based index value, range:[0, RecGetCount()-1]
   * @return name of item.
   */
  public String RecItemGetName( int rec, int index )
  {
    return recItemGetName( rec, index );
  }
  /**
   * Get page no by index.
   * @param rec RecordSet Handle that returned by RecOpen
   * @param index 0 based index value, range:[0, RecGetCount()-1]
   * @return 0 based page NO.
   */
  public int RecItemGetPage( int rec, int index )
  {
    return recItemGetPage( rec, index );
  }
  /**
   * remove item by index.
   * @param rec RecordSet Handle that returned by RecOpen
   * @param index 0 based index value, range:[0, RecGetCount()-1]
   * @return true or false.
   */
  public boolean RecItemRemove( int rec, int index )
  {
    return recItemRemove( rec, index );
  }
  /**
   * insert item.
   * @param rec RecordSet Handle that returned by RecOpen
   * @param name label of BookMark.
   * @param pageno 0 based page no recorded.
   * @return true or false
   */
  public boolean RecItemInsert( int rec, String name, int pageno )
  {
    return recItemInsert( rec, name, pageno );
  }
}




Java Source Code List

com.example.pdfhttpdemo.MainActivity.java
com.example.pdfhttpdemo.ReaderController.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.BMDatabase.java
com.radaee.pdf.Document.java
com.radaee.pdf.Document.java
com.radaee.pdf.Document.java
com.radaee.pdf.Global.java
com.radaee.pdf.Global.java
com.radaee.pdf.Global.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.HWriting.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Ink.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.Matrix.java
com.radaee.pdf.PDFHttpStream.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.PageContent.java
com.radaee.pdf.Page.java
com.radaee.pdf.Page.java
com.radaee.pdf.Page.java
com.radaee.pdf.Path.java
com.radaee.pdf.Path.java
com.radaee.pdf.Path.java
com.radaee.reader.PDFCropAct.java
com.radaee.reader.PDFCrop.java
com.radaee.reader.PDFEncAct.java
com.radaee.reader.PDFInkAct.java
com.radaee.reader.PDFInk.java
com.radaee.reader.PDFReaderAct.java
com.radaee.reader.PDFReaderOldAct.java
com.radaee.reader.PDFReaderOld.java
com.radaee.reader.PDFReader.java
com.radaee.reader.PDFSimpleAct.java
com.radaee.reader.PDFSimple.java
com.radaee.reader.PDFTestAct.java
com.radaee.reader.ReaderActivity.java
com.radaee.reader.ReaderController.java
com.radaee.reader.ReaderController.java
com.radaee.util.ComboListAdt.java
com.radaee.util.ComboList.java
com.radaee.util.PDFAESEnc.java
com.radaee.util.PDFAESEnc.java
com.radaee.util.PDFAESStream.java
com.radaee.util.PDFAESStream.java
com.radaee.util.PDFAssetStream.java
com.radaee.util.PDFAssetStream.java
com.radaee.util.PDFFileStream.java
com.radaee.util.PDFFileStream.java
com.radaee.util.PDFGridAdt.java
com.radaee.util.PDFGridItem.java
com.radaee.util.PDFGridThread.java
com.radaee.util.PDFGridView.java
com.radaee.util.PDFHttpStream.java
com.radaee.util.PDFHttpStream.java
com.radaee.util.PDFMemStream.java
com.radaee.util.PDFMemStream.java
com.radaee.util.PDFThumbView.java
com.radaee.util.SnatchAdt.java
com.radaee.util.SnatchView.java
com.rootsoft.pdfviewer.main.java
com.rootsoft.pdfviewer.readercontroller.java
com.rootsoft.rspdfviewer.pdf.RSPDFAnnotation.java
com.rootsoft.rspdfviewer.pdf.RSPDFBMDatabase.java
com.rootsoft.rspdfviewer.pdf.RSPDFDocument.java
com.rootsoft.rspdfviewer.pdf.RSPDFGlobal.java
com.rootsoft.rspdfviewer.pdf.RSPDFHWriting.java
com.rootsoft.rspdfviewer.pdf.RSPDFInk.java
com.rootsoft.rspdfviewer.pdf.RSPDFMatrix.java
com.rootsoft.rspdfviewer.pdf.RSPDFPageContent.java
com.rootsoft.rspdfviewer.pdf.RSPDFPage.java
com.rootsoft.rspdfviewer.pdf.RSPDFPath.java
com.rootsoft.rspdfviewer.pdf.RSPDFTemplate.java
com.rootsoft.rspdfviewer.pdf.RSPDFVPage.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewCurl.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewDual.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewHorz.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewThumb.java
com.rootsoft.rspdfviewer.pdf.RSPDFViewVert.java
com.rootsoft.rspdfviewer.pdf.RSPDFView.java
com.rootsoft.rspdfviewer.pdf.RSReaderView.java