API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.sql. DataTruncation View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      Throwable
          Exception
              SQLException
                  SQLWarning
                      DataTruncation
Implements
Subclasses
Description
public exception DataTruncation
  An exception thrown as a DataTruncation exception (on writes) or reported as a DataTruncation warning (on reads) when a data values is unexpectedly truncated for reasons other than its having execeeded MaxFieldSize.
See also:   
Constructors
public DataTruncation (int index, boolean parameter, boolean read, int dataSize, int transferSize)
  Creates a DataTruncation object with the SQLState initialized to 01004 when read is set to true and 22001 when read is set to false, the reason set to "Data truncation", the vendor code set to 0, and the other fields set to the given values.
public DataTruncation (int index, boolean parameter, boolean read, int dataSize, int transferSize, Throwable cause)
  Creates a DataTruncation object with the SQLState initialized to 01004 when read is set to true and 22001 when read is set to false, the reason set to "Data truncation", the vendor code set to 0, and the other fields set to the given values.
Methods
Hide/Show inherited methods
publicsynchronizednative Throwable fillInStackTrace () [Inherited From Throwable]
  Fills in the execution stack trace.
public Throwable getCause () [Inherited From Throwable]
  Returns the cause of this throwable or null if the cause is nonexistent or unknown.
public int getDataSize ()
  Gets the number of bytes of data that should have been transferred.
public int getErrorCode () [Inherited From SQLException]
  Retrieves the vendor-specific exception code for this SQLException object.
public int getIndex ()
  Retrieves the index of the column or parameter that was truncated.
public String getLocalizedMessage () [Inherited From Throwable]
  Creates a localized description of this throwable.
public String getMessage () [Inherited From Throwable]
  Returns the detail message string of this throwable.
public SQLException getNextException () [Inherited From SQLException]
  Retrieves the exception chained to this SQLException object by setNextException(SQLException ex).
public SQLWarning getNextWarning () [Inherited From SQLWarning]
  Retrieves the warning chained to this SQLWarning object by setNextWarning.
public boolean getParameter ()
  Indicates whether the value truncated was a parameter value or a column value.
public boolean getRead ()
  Indicates whether or not the value was truncated on a read.
public String getSQLState () [Inherited From SQLException]
  Retrieves the SQLState for this SQLException object.
public StackTraceElement getStackTrace () [Inherited From Throwable]
  Provides programmatic access to the stack trace information printed by Throwable.printStackTrace().
public int getTransferSize ()
  Gets the number of bytes of data actually transferred.
publicsynchronized Throwable initCause (Throwable cause) [Inherited From Throwable]
  Initializes the cause of this throwable to the specified value.
public Iterator<Throwable> iterator () [Inherited From SQLException]
  Returns an iterator over the chained SQLExceptions.
public void printStackTrace () [Inherited From Throwable]
  Prints this throwable and its backtrace to the standard error stream.
public void printStackTrace (PrintStream s) [Inherited From Throwable]
  Prints this throwable and its backtrace to the specified print stream.
public void printStackTrace (PrintWriter s) [Inherited From Throwable]
  Prints this throwable and its backtrace to the specified print writer.
public void setNextException (SQLException ex) [Inherited From SQLException]
  Adds an SQLException object to the end of the chain.
public void setNextWarning (SQLWarning w) [Inherited From SQLWarning]
  Adds a SQLWarning object to the end of the chain.
public void setStackTrace (StackTraceElement stackTrace) [Inherited From Throwable]
  Sets the stack trace elements that will be returned by Throwable.getStackTrace() and printed by Throwable.printStackTrace() and related methods.
public String toString () [Inherited From Throwable]
  Returns a short description of this throwable.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar