Codota Logo
SQLiteDatabaseCorruptException
Code IndexAdd Codota to your IDE (free)

How to use
SQLiteDatabaseCorruptException
in
android.database.sqlite

Best Java code snippets using android.database.sqlite.SQLiteDatabaseCorruptException (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: robolectric/robolectric

 private static RuntimeException getSqliteException(final String message, final int baseErrorCode) {
  // Mapping is from throw_sqlite3_exception in android_database_SQLiteCommon.cpp
  switch (baseErrorCode) {
   case SQLiteConstants.SQLITE_ABORT: return new SQLiteAbortException(message);
   case SQLiteConstants.SQLITE_PERM: return new SQLiteAccessPermException(message);
   case SQLiteConstants.SQLITE_RANGE: return new SQLiteBindOrColumnIndexOutOfRangeException(message);
   case SQLiteConstants.SQLITE_TOOBIG: return new SQLiteBlobTooBigException(message);
   case SQLiteConstants.SQLITE_CANTOPEN: return new SQLiteCantOpenDatabaseException(message);
   case SQLiteConstants.SQLITE_CONSTRAINT: return new SQLiteConstraintException(message);
   case SQLiteConstants.SQLITE_NOTADB: // fall through
   case SQLiteConstants.SQLITE_CORRUPT: return new SQLiteDatabaseCorruptException(message);
   case SQLiteConstants.SQLITE_BUSY: return new SQLiteDatabaseLockedException(message);
   case SQLiteConstants.SQLITE_MISMATCH: return new SQLiteDatatypeMismatchException(message);
   case SQLiteConstants.SQLITE_IOERR: return new SQLiteDiskIOException(message);
   case SQLiteConstants.SQLITE_DONE: return new SQLiteDoneException(message);
   case SQLiteConstants.SQLITE_FULL: return new SQLiteFullException(message);
   case SQLiteConstants.SQLITE_MISUSE: return new SQLiteMisuseException(message);
   case SQLiteConstants.SQLITE_NOMEM: return new SQLiteOutOfMemoryException(message);
   case SQLiteConstants.SQLITE_READONLY: return new SQLiteReadOnlyDatabaseException(message);
   case SQLiteConstants.SQLITE_LOCKED: return new SQLiteTableLockedException(message);
   case SQLiteConstants.SQLITE_INTERRUPT: return new OperationCanceledException(message);
   default: return new android.database.sqlite.SQLiteException(message
     + ", base error code: " + baseErrorCode);
  }
 }
}
origin: oliexdev/openScale

public void importDatabase(Uri importFile) throws IOException {
  File exportFile = context.getApplicationContext().getDatabasePath("openScale.db");
  File tmpExportFile = context.getApplicationContext().getDatabasePath("openScale_tmp.db");
  try {
    copyFile(Uri.fromFile(exportFile), Uri.fromFile(tmpExportFile));
    copyFile(importFile, Uri.fromFile(exportFile));
    reopenDatabase(false);
    if (!getScaleUserList().isEmpty()) {
      selectScaleUser(getScaleUserList().get(0).getId());
      updateScaleData();
    }
  } catch (SQLiteDatabaseCorruptException e) {
    copyFile(Uri.fromFile(tmpExportFile), Uri.fromFile(exportFile));
    throw new IOException(e.getMessage());
  } finally {
    tmpExportFile.delete();
  }
}
origin: wiglenet/wigle-wifi-wardriving

  throw new SQLiteDatabaseCorruptException("Samsung-specific stack overflow on integrity check.");
}finally {
  if (null != cursor) {
origin: wiglenet/wigle-wifi-wardriving

  throw new SQLiteDatabaseCorruptException("Samsung-specific stack overflow on integrity check.");
}finally {
  if (null != cursor) {
origin: geniusgithub/AndroidDialer

  @Override
  public void onQueryComplete(int token, Object cookie, Cursor cursor) {
    int rowsReturned = cursor == null ? 0 : cursor.getCount();
    if (rowsReturned != 1) {
      throw new SQLiteDatabaseCorruptException
          ("Returned " + rowsReturned + " rows for uri "
              + uri + "where 1 expected.");
    }
    cursor.moveToFirst();
    final ContentValues values = new ContentValues();
    DatabaseUtils.cursorRowToContentValues(cursor, values);
    values.remove(FilteredNumberCompat.getIdColumnName());
    startDelete(NO_TOKEN, new Listener() {
      @Override
      public void onDeleteComplete(int token, Object cookie, int result) {
        if (listener != null) {
          listener.onUnblockComplete(result, values);
        }
      }
    }, uri, null, null);
  }
}, uri, null, null, null, null);
origin: org.robolectric/shadows-core-v23

 private RuntimeException getSqliteException(String message, int baseErrorCode) {
  // Mapping is from throw_sqlite3_exception in android_database_SQLiteCommon.cpp
  switch (baseErrorCode) {
   case SQLiteConstants.SQLITE_ABORT: return new SQLiteAbortException(message);
   case SQLiteConstants.SQLITE_PERM: return new SQLiteAccessPermException(message);
   case SQLiteConstants.SQLITE_RANGE: return new SQLiteBindOrColumnIndexOutOfRangeException(message);
   case SQLiteConstants.SQLITE_TOOBIG: return new SQLiteBlobTooBigException(message);
   case SQLiteConstants.SQLITE_CANTOPEN: return new SQLiteCantOpenDatabaseException(message);
   case SQLiteConstants.SQLITE_CONSTRAINT: return new SQLiteConstraintException(message);
   case SQLiteConstants.SQLITE_NOTADB: // fall through
   case SQLiteConstants.SQLITE_CORRUPT: return new SQLiteDatabaseCorruptException(message);
   case SQLiteConstants.SQLITE_BUSY: return new SQLiteDatabaseLockedException(message);
   case SQLiteConstants.SQLITE_MISMATCH: return new SQLiteDatatypeMismatchException(message);
   case SQLiteConstants.SQLITE_IOERR: return new SQLiteDiskIOException(message);
   case SQLiteConstants.SQLITE_DONE: return new SQLiteDoneException(message);
   case SQLiteConstants.SQLITE_FULL: return new SQLiteFullException(message);
   case SQLiteConstants.SQLITE_MISUSE: return new SQLiteMisuseException(message);
   case SQLiteConstants.SQLITE_NOMEM: return new SQLiteOutOfMemoryException(message);
   case SQLiteConstants.SQLITE_READONLY: return new SQLiteReadOnlyDatabaseException(message);
   case SQLiteConstants.SQLITE_LOCKED: return new SQLiteTableLockedException(message);
   case SQLiteConstants.SQLITE_INTERRUPT: return new OperationCanceledException(message);
   default: return new android.database.sqlite.SQLiteException(message
    + ", base error code: " + baseErrorCode);
  }
 }
}
origin: org.robolectric/shadows-core

 private RuntimeException getSqliteException(String message, int baseErrorCode) {
  // Mapping is from throw_sqlite3_exception in android_database_SQLiteCommon.cpp
  switch (baseErrorCode) {
   case SQLiteConstants.SQLITE_ABORT: return new SQLiteAbortException(message);
   case SQLiteConstants.SQLITE_PERM: return new SQLiteAccessPermException(message);
   case SQLiteConstants.SQLITE_RANGE: return new SQLiteBindOrColumnIndexOutOfRangeException(message);
   case SQLiteConstants.SQLITE_TOOBIG: return new SQLiteBlobTooBigException(message);
   case SQLiteConstants.SQLITE_CANTOPEN: return new SQLiteCantOpenDatabaseException(message);
   case SQLiteConstants.SQLITE_CONSTRAINT: return new SQLiteConstraintException(message);
   case SQLiteConstants.SQLITE_NOTADB: // fall through
   case SQLiteConstants.SQLITE_CORRUPT: return new SQLiteDatabaseCorruptException(message);
   case SQLiteConstants.SQLITE_BUSY: return new SQLiteDatabaseLockedException(message);
   case SQLiteConstants.SQLITE_MISMATCH: return new SQLiteDatatypeMismatchException(message);
   case SQLiteConstants.SQLITE_IOERR: return new SQLiteDiskIOException(message);
   case SQLiteConstants.SQLITE_DONE: return new SQLiteDoneException(message);
   case SQLiteConstants.SQLITE_FULL: return new SQLiteFullException(message);
   case SQLiteConstants.SQLITE_MISUSE: return new SQLiteMisuseException(message);
   case SQLiteConstants.SQLITE_NOMEM: return new SQLiteOutOfMemoryException(message);
   case SQLiteConstants.SQLITE_READONLY: return new SQLiteReadOnlyDatabaseException(message);
   case SQLiteConstants.SQLITE_LOCKED: return new SQLiteTableLockedException(message);
   case SQLiteConstants.SQLITE_INTERRUPT: return new OperationCanceledException(message);
   default: return new android.database.sqlite.SQLiteException(message
     + ", base error code: " + baseErrorCode);
  }
 }
}
origin: org.robolectric/framework

 private static RuntimeException getSqliteException(final String message, final int baseErrorCode) {
  // Mapping is from throw_sqlite3_exception in android_database_SQLiteCommon.cpp
  switch (baseErrorCode) {
   case SQLiteConstants.SQLITE_ABORT: return new SQLiteAbortException(message);
   case SQLiteConstants.SQLITE_PERM: return new SQLiteAccessPermException(message);
   case SQLiteConstants.SQLITE_RANGE: return new SQLiteBindOrColumnIndexOutOfRangeException(message);
   case SQLiteConstants.SQLITE_TOOBIG: return new SQLiteBlobTooBigException(message);
   case SQLiteConstants.SQLITE_CANTOPEN: return new SQLiteCantOpenDatabaseException(message);
   case SQLiteConstants.SQLITE_CONSTRAINT: return new SQLiteConstraintException(message);
   case SQLiteConstants.SQLITE_NOTADB: // fall through
   case SQLiteConstants.SQLITE_CORRUPT: return new SQLiteDatabaseCorruptException(message);
   case SQLiteConstants.SQLITE_BUSY: return new SQLiteDatabaseLockedException(message);
   case SQLiteConstants.SQLITE_MISMATCH: return new SQLiteDatatypeMismatchException(message);
   case SQLiteConstants.SQLITE_IOERR: return new SQLiteDiskIOException(message);
   case SQLiteConstants.SQLITE_DONE: return new SQLiteDoneException(message);
   case SQLiteConstants.SQLITE_FULL: return new SQLiteFullException(message);
   case SQLiteConstants.SQLITE_MISUSE: return new SQLiteMisuseException(message);
   case SQLiteConstants.SQLITE_NOMEM: return new SQLiteOutOfMemoryException(message);
   case SQLiteConstants.SQLITE_READONLY: return new SQLiteReadOnlyDatabaseException(message);
   case SQLiteConstants.SQLITE_LOCKED: return new SQLiteTableLockedException(message);
   case SQLiteConstants.SQLITE_INTERRUPT: return new OperationCanceledException(message);
   default: return new android.database.sqlite.SQLiteException(message
     + ", base error code: " + baseErrorCode);
  }
 }
}
origin: org.robolectric/shadows-framework

 private static RuntimeException getSqliteException(final String message, final int baseErrorCode) {
  // Mapping is from throw_sqlite3_exception in android_database_SQLiteCommon.cpp
  switch (baseErrorCode) {
   case SQLiteConstants.SQLITE_ABORT: return new SQLiteAbortException(message);
   case SQLiteConstants.SQLITE_PERM: return new SQLiteAccessPermException(message);
   case SQLiteConstants.SQLITE_RANGE: return new SQLiteBindOrColumnIndexOutOfRangeException(message);
   case SQLiteConstants.SQLITE_TOOBIG: return new SQLiteBlobTooBigException(message);
   case SQLiteConstants.SQLITE_CANTOPEN: return new SQLiteCantOpenDatabaseException(message);
   case SQLiteConstants.SQLITE_CONSTRAINT: return new SQLiteConstraintException(message);
   case SQLiteConstants.SQLITE_NOTADB: // fall through
   case SQLiteConstants.SQLITE_CORRUPT: return new SQLiteDatabaseCorruptException(message);
   case SQLiteConstants.SQLITE_BUSY: return new SQLiteDatabaseLockedException(message);
   case SQLiteConstants.SQLITE_MISMATCH: return new SQLiteDatatypeMismatchException(message);
   case SQLiteConstants.SQLITE_IOERR: return new SQLiteDiskIOException(message);
   case SQLiteConstants.SQLITE_DONE: return new SQLiteDoneException(message);
   case SQLiteConstants.SQLITE_FULL: return new SQLiteFullException(message);
   case SQLiteConstants.SQLITE_MISUSE: return new SQLiteMisuseException(message);
   case SQLiteConstants.SQLITE_NOMEM: return new SQLiteOutOfMemoryException(message);
   case SQLiteConstants.SQLITE_READONLY: return new SQLiteReadOnlyDatabaseException(message);
   case SQLiteConstants.SQLITE_LOCKED: return new SQLiteTableLockedException(message);
   case SQLiteConstants.SQLITE_INTERRUPT: return new OperationCanceledException(message);
   default: return new android.database.sqlite.SQLiteException(message
     + ", base error code: " + baseErrorCode);
  }
 }
}
android.database.sqliteSQLiteDatabaseCorruptException

Most used methods

  • <init>
  • getMessage

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onCreateOptionsMenu (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Kernel (java.awt.image)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now