Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.patch
Class PatchIndexFile

java.lang.Object
  extended by oracle.javatools.patch.PatchIndexFile


public class PatchIndexFile
extends java.lang.Object

The class representing an index file for a PatchContributor.

Since:
10.1.3.0.3

Field Summary
static java.lang.String separator
           
static char separatorChar
           

 

Constructor Summary
PatchIndexFile(java.io.File directoryFile, java.lang.String path)
          Constructs a new PatchIndexFile for the given directory and path.

 

Method Summary
protected  boolean createBackup(java.lang.String backupFileName)
          Creates the index backup file on the filesystem, copying file contents.
protected  boolean createNewFile()
          Creates a new index file on the filesystem.
protected  boolean delete()
          Deleles the index file on the filesystem.
protected  boolean exists()
          Gets whether the index file exists on the filesystem.
protected  java.lang.String getBackupName()
          Gets the file name for the index backup file to be created.
 java.io.File getDirectoryFile()
          Gets the working directory file of the index file.
 java.io.File getFile()
          Gets the index file as a File.
 java.lang.String getPath()
          Gets the path of the index file.
protected  java.lang.String getRevision()
          Gets the revision number of the index file.
protected  TextBuffer getTextBuffer()
          Gets the internal text buffer for the index file.
protected  boolean isDirectory()
          Gets whether the index file exists on the filesystem as a directory.
protected  long lastModified()
          Gets the modification time of the index file.
protected  boolean saveTextBuffer()
          Saves the internal text buffer to the filesystem.
 void setEncoding(java.lang.String charsetName)
          Sets the encoding character set of the index file.
protected  boolean setLastModified(long modTime)
          Sets the modification time of the index file.
protected  boolean setReadOnly(boolean readOnly)
          Sets the read-only flag for the index file
 void setTextBuffer(TextBuffer textBuffer)
          Sets the internal text buffer for the index file.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

separatorChar

public static final char separatorChar
See Also:
Constant Field Values

separator

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

Constructor Detail

PatchIndexFile

public PatchIndexFile(java.io.File directoryFile,
                      java.lang.String path)
Constructs a new PatchIndexFile for the given directory and path.
Parameters:
directoryFile - the working directory file.
path - the path.

Method Detail

setTextBuffer

public void setTextBuffer(TextBuffer textBuffer)
Sets the internal text buffer for the index file.
Parameters:
textBuffer - the text buffer.

setEncoding

public void setEncoding(java.lang.String charsetName)
Sets the encoding character set of the index file.
Parameters:
charsetName - the encoding name.

getDirectoryFile

public java.io.File getDirectoryFile()
Gets the working directory file of the index file.
Returns:
the working directory file.

getPath

public java.lang.String getPath()
Gets the path of the index file.
Returns:
the path.

getFile

public java.io.File getFile()
Gets the index file as a File.
Returns:
the index file.

exists

protected boolean exists()
Gets whether the index file exists on the filesystem.
Returns:
true if the file exists.

isDirectory

protected boolean isDirectory()
Gets whether the index file exists on the filesystem as a directory.
Returns:
true if the file exists as a directory.

createNewFile

protected boolean createNewFile()
                         throws java.io.IOException
Creates a new index file on the filesystem.
Returns:
true if the index file was successfully created.
Throws:
java.io.IOException - if an I/O error occurred.

getTextBuffer

protected TextBuffer getTextBuffer()
                            throws java.io.IOException
Gets the internal text buffer for the index file.
Returns:
the text buffer.
Throws:
java.io.IOException - if an I/O error occurred while reading the file.

saveTextBuffer

protected boolean saveTextBuffer()
                          throws java.io.IOException
Saves the internal text buffer to the filesystem.
Returns:
true if the text buffer was successfully saved.
Throws:
java.io.IOException - if an I/O error occurred while writing the file.

getBackupName

protected java.lang.String getBackupName()
Gets the file name for the index backup file to be created.
Returns:
the backup file name.

createBackup

protected boolean createBackup(java.lang.String backupFileName)
                        throws java.io.IOException
Creates the index backup file on the filesystem, copying file contents.
Parameters:
backupFileName - the backup file name.
Returns:
true if the backup file was successfully created.
Throws:
java.io.IOException - if an I/O error occurred copying file contents.

delete

protected boolean delete()
Deleles the index file on the filesystem.
Returns:
true if the index file was successfully deleted.

setLastModified

protected boolean setLastModified(long modTime)
Sets the modification time of the index file.
Parameters:
modTime - the modification time, in milliseconds since Epoch.
Returns:
true if the modification file was set.

lastModified

protected long lastModified()
Gets the modification time of the index file.
Returns:
the modification time, in milliseconds since Epoch.

setReadOnly

protected boolean setReadOnly(boolean readOnly)
Sets the read-only flag for the index file
Parameters:
readOnly - true if the index file should be set read-only.
Returns:
true if the read-only flag was set.

getRevision

protected java.lang.String getRevision()
Gets the revision number of the index file.
Returns:
the revision number.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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