FileDocCategorySizeDatePackage
FileDecodingImageSource.javaAPI DocAndroid 1.5 API1961Wed May 06 22:41:54 BST 2009org.apache.harmony.awt.gl.image

FileDecodingImageSource

public class FileDecodingImageSource extends DecodingImageSource
author
Oleg V. Khaschansky
version
$Revision$

Fields Summary
String
filename
Constructors Summary
public FileDecodingImageSource(String file)

    SecurityManager security = System.getSecurityManager();
    if (security != null) {
        security.checkRead(file);
    }

    filename = file;
  
Methods Summary
protected booleancheckConnection()

      SecurityManager security = System.getSecurityManager();
      if (security != null) {
          try {
            security.checkRead(filename);
          } catch (SecurityException e) {
              return false;
          }
      }

      return true;
  
protected java.io.InputStreamgetInputStream()

    try {
      // BEGIN android-modified
      return new BufferedInputStream(new FileInputStream(filename), 8192);
      // END android-modified
    } catch (FileNotFoundException e) {
      return null;
    }