Skip navigation links


com.essbase.eas.utils
Class RandomAccessFileListModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by com.essbase.eas.utils.RandomAccessFileListModel

All Implemented Interfaces:
java.io.Serializable, javax.swing.ListModel
Direct Known Subclasses:
VFindListModel

public class RandomAccessFileListModel
extends javax.swing.AbstractListModel

Title: RandomAccessResultSetFile Description: Copyright: Copyright (c) 2003 Company: Hyperion Solutions, Inc.

Version:
1.0
Author:
Sree Menon
See Also:
Serialized Form

Nested Class Summary
 class RandomAccessFileListModel.ListRenderer
           
static class RandomAccessFileListModel.RAFTextReader
           
 class RandomAccessFileListModel.TextFileRenderer
           
 class RandomAccessFileListModel.TextRenderer
           

 

Field Summary

 

Fields inherited from class javax.swing.AbstractListModel
listenerList

 

Constructor Summary
RandomAccessFileListModel()
          Empty constructor
RandomAccessFileListModel(java.io.File dataFile, java.io.File indexFile)
          Constructor with the source or output file
RandomAccessFileListModel(java.util.List textList, boolean hasCR, boolean close)
           
RandomAccessFileListModel(RandomAccessFileListWriter renderer, boolean close)
           
RandomAccessFileListModel(java.lang.String text, boolean hasCR, boolean close)
           
RandomAccessFileListModel(TextFileReader reader, boolean close)
           

 

Method Summary
 void add(java.lang.Object o)
           
 void clearContents()
           
 void close()
           
 void deleteFile()
           
 void dispose()
           
 java.lang.Object getElementAt(int index)
           
 java.io.File[] getFile()
           
 int getLength()
           
 int getLineCount()
           
 int getRowCount()
           
 int getSize()
           
 boolean readFromFile()
          Reads the file
 boolean readFromFile(RandomAccessFileListReader reader)
           
 void setDeleteOnExit(boolean delete)
           
 void setFile(java.io.File dataFile, java.io.File indexFile)
           
 java.lang.String toString()
           
 void writeRow(java.lang.Object value)
          Writes a row information to the file
 boolean writeToFile(java.util.Collection collection, boolean close)
          Writes a result set to a file
 boolean writeToFile(RandomAccessFileListWriter renderer, boolean closeOnEnd)
           
 boolean writeToFile(java.lang.String textWithCR, boolean includeEOL, boolean close)
          Writes the contents of a file using the reader to a RAF file
 boolean writeToFile(TextFileReader reader, boolean close)
          Writes the contents of a file using the reader to a RAF file
 boolean writeToFileWithCR(java.util.Collection collection, boolean close)
          Writes a result set to a file

 

Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener

 

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

 

Constructor Detail

RandomAccessFileListModel

public RandomAccessFileListModel()
Empty constructor

RandomAccessFileListModel

public RandomAccessFileListModel(java.io.File dataFile,
                                 java.io.File indexFile)
Constructor with the source or output file
Parameters:
file - file

RandomAccessFileListModel

public RandomAccessFileListModel(TextFileReader reader,
                                 boolean close)
                          throws java.io.IOException
Throws:
java.io.IOException

RandomAccessFileListModel

public RandomAccessFileListModel(java.util.List textList,
                                 boolean hasCR,
                                 boolean close)
                          throws java.io.IOException
Throws:
java.io.IOException

RandomAccessFileListModel

public RandomAccessFileListModel(java.lang.String text,
                                 boolean hasCR,
                                 boolean close)
                          throws java.io.IOException
Throws:
java.io.IOException

RandomAccessFileListModel

public RandomAccessFileListModel(RandomAccessFileListWriter renderer,
                                 boolean close)
                          throws java.io.IOException
Throws:
java.io.IOException

Method Detail

setFile

public void setFile(java.io.File dataFile,
                    java.io.File indexFile)

readFromFile

public boolean readFromFile()
                     throws java.io.IOException
Reads the file
Returns:
true if success
Throws:
java.io.IOException

readFromFile

public boolean readFromFile(RandomAccessFileListReader reader)
                     throws java.io.IOException
Throws:
java.io.IOException

writeRow

public void writeRow(java.lang.Object value)
              throws java.io.IOException
Writes a row information to the file
Parameters:
value - the column values for the row. It has to be of the same format defined by the column types.
Throws:
java.io.IOException

writeToFile

public boolean writeToFile(java.util.Collection collection,
                           boolean close)
Writes a result set to a file
Parameters:
collection - collection
Returns:
true if success

add

public void add(java.lang.Object o)
         throws java.io.IOException
Throws:
java.io.IOException

writeToFileWithCR

public boolean writeToFileWithCR(java.util.Collection collection,
                                 boolean close)
Writes a result set to a file
Parameters:
collection - collection
Returns:
true if success

writeToFile

public boolean writeToFile(TextFileReader reader,
                           boolean close)
Writes the contents of a file using the reader to a RAF file
Parameters:
reader - the reader to read the file
Returns:
true on success

writeToFile

public boolean writeToFile(java.lang.String textWithCR,
                           boolean includeEOL,
                           boolean close)
Writes the contents of a file using the reader to a RAF file
Parameters:
textWithCR - the text with new lines
Returns:
true on success

writeToFile

public boolean writeToFile(RandomAccessFileListWriter renderer,
                           boolean closeOnEnd)

getRowCount

public int getRowCount()

getFile

public java.io.File[] getFile()

deleteFile

public void deleteFile()
                throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

setDeleteOnExit

public void setDeleteOnExit(boolean delete)

getLength

public int getLength()

getSize

public int getSize()

getLineCount

public int getLineCount()

getElementAt

public java.lang.Object getElementAt(int index)

toString

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

clearContents

public void clearContents()

dispose

public void dispose()

Skip navigation links


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