Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.util.file
Class FileHandleImpl

java.lang.Object
  extended by oracle.adfnmc.util.file.FileHandleImpl

public class FileHandleImpl
extends java.lang.Object

Wraps a FileConnection object which can be used to gain access to a file

Author:
pchandra

Field Summary
static java.lang.Class CLASS_INSTANCE
           
static java.lang.String fileSchemePrefix
           
static java.lang.String separator
           
static char separatorChar
           
 
Method Summary
 long availableSize()
           
 void close()
          Close the underlying file handle
static FileHandleImpl create(java.lang.String path)
          Factory method to create a FileHandle to the specified dir or filename
 void createFile()
           
 void delete()
          Attempt to delete the file
 boolean exists()
          Does this file exist?
 long fileSize()
          Returns the file's size, in bytes.
static FileSystemInfo[] getFileSystemRoots()
          Get an array of all the file system roots, e.g.
 java.lang.String getName()
           
 java.lang.String getPath()
           
 boolean isDirectory()
          Is this a directory?
 java.lang.String[] list()
           
 boolean mkdir()
          Make the directory specified by the path
 java.io.InputStream openFileForReading()
           
 java.io.OutputStream openFileForWriting()
           
 java.io.OutputStream openFileForWriting(boolean append)
           
 long totalSize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_INSTANCE

public static final java.lang.Class CLASS_INSTANCE

separatorChar

public static final char separatorChar
See Also:
Constant Field Values

separator

public static final java.lang.String separator
See Also:
Constant Field Values

fileSchemePrefix

public static final java.lang.String fileSchemePrefix
See Also:
Constant Field Values
Method Detail

create

public static FileHandleImpl create(java.lang.String path)
Factory method to create a FileHandle to the specified dir or filename

Parameters:
path -
Returns:

exists

public boolean exists()
Does this file exist?


isDirectory

public boolean isDirectory()
Is this a directory?


close

public void close()
Close the underlying file handle


mkdir

public boolean mkdir()
Make the directory specified by the path


createFile

public void createFile()

openFileForWriting

public java.io.OutputStream openFileForWriting()

openFileForWriting

public java.io.OutputStream openFileForWriting(boolean append)

openFileForReading

public java.io.InputStream openFileForReading()

getFileSystemRoots

public static FileSystemInfo[] getFileSystemRoots()
Get an array of all the file system roots, e.g. "C:\" or "/SDCard"

Returns:

getPath

public java.lang.String getPath()

fileSize

public long fileSize()
Returns the file's size, in bytes.

Returns:

delete

public void delete()
Attempt to delete the file


getName

public java.lang.String getName()

list

public java.lang.String[] list()

availableSize

public long availableSize()

totalSize

public long totalSize()

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.