Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.jdeveloper.compiler
Class IdeStorage

java.lang.Object
  extended by oracle.jdeveloper.compiler.IdeStorage
All Implemented Interfaces:
Storage

public class IdeStorage
extends java.lang.Object
implements Storage

The IdeStorage implements compiler Storage interface and manages input/output for files stored in the IDE process memory.

See Also:
Storage

Field Summary
 Node node
           
 
Constructor Summary
IdeStorage(Node node)
           
 
Method Summary
 void close()
          Closes a Storage that previously opened for data access.
 Storage create(java.lang.String name)
          Creates a new Storage for data access if doesn't exists yet.
 Storage createDir(java.lang.String name)
          Creates a new directory Storage if doesn't exists yet.
 boolean equals(java.lang.Object other)
           
 java.lang.String getCanonicalPath()
          Returns the canonical path name of this Storage.
 java.lang.String getName()
          Returns the name of this Storage (without leading directories).
 java.lang.String getParent()
           
 java.lang.String getPath()
          Returns the path name of this Storage.
 java.lang.Object getProperty(java.lang.String property)
          Queries custom property associated with this Storage.
 int hashCode()
           
 boolean isDirectory()
          Indicates whether this is a directory Storage.
 boolean isInJar()
          is this store contained in a zip/jar file?
 java.lang.String[] list()
          Lists all names of Storages within this directory Storage.
 java.util.ArrayList listStorage()
          Lists all Storages within this directory Storage.
 long modDate()
          Returns date of last modification of this Storage.
 void open()
          Opens a Storage for access.
 Storage open(java.lang.String name)
          Opens a Storage for access.
 Storage openDir(java.lang.String name)
           
 byte[] read()
          Reads the entire contents of this data Storage.
 int read(byte[] buf)
          Tries to fill a buffer with data from contents of this Storage.
 Storage setContext(Storage newContext)
           
 void setPackage(java.lang.String packageName)
           
 void setProperty(java.lang.String property, java.lang.Object value)
          Allows association of custom properties with this Storage.
 int size()
          Returns the size of contents of this data Storage.
 java.lang.String toString()
           
 void write(byte[] xs, int start, int len)
          Write the contents of a byte array into this Storage.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

node

public Node node
Constructor Detail

IdeStorage

public IdeStorage(Node node)
Method Detail

setContext

public Storage setContext(Storage newContext)

setPackage

public void setPackage(java.lang.String packageName)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

modDate

public long modDate()
Description copied from interface: Storage
Returns date of last modification of this Storage.

Specified by:
modDate in interface Storage
Returns:
date of modification

getName

public java.lang.String getName()
Description copied from interface: Storage
Returns the name of this Storage (without leading directories).

Specified by:
getName in interface Storage
Returns:
name

getPath

public java.lang.String getPath()
Description copied from interface: Storage
Returns the path name of this Storage.

Specified by:
getPath in interface Storage
Returns:
path

getCanonicalPath

public java.lang.String getCanonicalPath()
Description copied from interface: Storage
Returns the canonical path name of this Storage.

Specified by:
getCanonicalPath in interface Storage
Returns:
canonical path

getParent

public java.lang.String getParent()

getProperty

public java.lang.Object getProperty(java.lang.String property)
Description copied from interface: Storage
Queries custom property associated with this Storage.

Specified by:
getProperty in interface Storage
Parameters:
property - property key
Returns:
property value

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
Description copied from interface: Storage
Allows association of custom properties with this Storage.

Specified by:
setProperty in interface Storage
Parameters:
property - property key
value - property value

isDirectory

public boolean isDirectory()
Description copied from interface: Storage
Indicates whether this is a directory Storage.

Specified by:
isDirectory in interface Storage
Returns:
true if directory else false

isInJar

public boolean isInJar()
is this store contained in a zip/jar file?

Specified by:
isInJar in interface Storage
Returns:
true if in jar/zip file else false

read

public byte[] read()
            throws java.io.IOException
Description copied from interface: Storage
Reads the entire contents of this data Storage. Note that this must not be a directory Storage.

Specified by:
read in interface Storage
Returns:
byte buffer containing all data of the Storage
Throws:
java.io.IOException

read

public int read(byte[] buf)
         throws java.io.IOException
Description copied from interface: Storage
Tries to fill a buffer with data from contents of this Storage. Note that this Storage must not be a directory Storage and must have been opened before attempting to read.

Specified by:
read in interface Storage
Parameters:
buf - buffer to be filled
Returns:
actual number of bytes read
Throws:
java.io.IOException

write

public void write(byte[] xs,
                  int start,
                  int len)
           throws java.io.IOException
Description copied from interface: Storage
Write the contents of a byte array into this Storage. Note that this Storage must not be a directory Storage, support write access and been opened before attempting to write.

Specified by:
write in interface Storage
Parameters:
xs - buffer to be written
start - offset within buffer where data starts
len - amount of data from buffer to be written
Throws:
java.io.IOException

list

public java.lang.String[] list()
Description copied from interface: Storage
Lists all names of Storages within this directory Storage. Note that this must be a directory Storage.

Specified by:
list in interface Storage

size

public int size()
         throws java.io.IOException
Description copied from interface: Storage
Returns the size of contents of this data Storage. Note that this must not be a directory Storage.

Specified by:
size in interface Storage
Returns:
size of Storage data in bytes
Throws:
java.io.IOException

listStorage

public java.util.ArrayList listStorage()
Description copied from interface: Storage
Lists all Storages within this directory Storage. Note that this must be a directory Storage.

Specified by:
listStorage in interface Storage

open

public void open()
          throws java.io.IOException
Description copied from interface: Storage
Opens a Storage for access.

Specified by:
open in interface Storage
Throws:
java.io.IOException

open

public Storage open(java.lang.String name)
Description copied from interface: Storage
Opens a Storage for access.

Specified by:
open in interface Storage
Parameters:
name - of Storage to be accessed
Returns:
Storage to be accessed

openDir

public Storage openDir(java.lang.String name)

create

public Storage create(java.lang.String name)
               throws java.io.IOException
Description copied from interface: Storage
Creates a new Storage for data access if doesn't exists yet. Note that this must be a directory Storage and support write access.

Specified by:
create in interface Storage
Parameters:
name - of Storage to be created
Returns:
Storage created
Throws:
java.io.IOException

createDir

public Storage createDir(java.lang.String name)
                  throws java.io.IOException
Description copied from interface: Storage
Creates a new directory Storage if doesn't exists yet. Note that this must be a directory Storage and support write access.

Specified by:
createDir in interface Storage
Parameters:
name - of Storage to be created
Returns:
Storage created
Throws:
java.io.IOException

close

public void close()
Description copied from interface: Storage
Closes a Storage that previously opened for data access.

Specified by:
close in interface Storage

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.