com.sun.image.codec.jpeg
Class TruncatedFileException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.sun.image.codec.jpeg.TruncatedFileException
All Implemented Interfaces:
Serializable

public class TruncatedFileException
extends RuntimeException

Signals that a truncated file was detected. This object contains the Raster/BufferedImage that has the partially decoded image data in it. There is no indication of the portion of the Raster that may or may not be good.

Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension.

Since:
JDK1.2
See Also:
JPEGImageDecoder, Serialized Form

Constructor Summary
TruncatedFileException(BufferedImage bi)
          Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
TruncatedFileException(Raster ras)
          Constructs an TruncatedFileException with the partially decoded Raster
 
Method Summary
 BufferedImage getBufferedImage()
          Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
 Raster getRaster()
          Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TruncatedFileException

public TruncatedFileException(BufferedImage bi)
Constructs a TruncatedFileException/code> with the partially decoded BufferedImage.
Parameters:
bi - the partially decoded BufferedImage (may be null).
Since:
JDK1.2

TruncatedFileException

public TruncatedFileException(Raster ras)
Constructs an TruncatedFileException with the partially decoded Raster
Parameters:
ras - the partially decoded Raster (may be null).
Since:
JDK1.2
Method Detail

getRaster

public Raster getRaster()
Allows access to the raster that was in the progress of being decoded may be null, it is likely to be only partially filled with image data.
Since:
JDK1.2

getBufferedImage

public BufferedImage getBufferedImage()
Allows access to the BufferedImage that was in the progress of being decoded, this may be null, it is likely to be only partially filled with image data.
Since:
JDK1.2


Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.