csm23
Class IO_Operations

java.lang.Object
  |
  +--csm23.IO_Operations

public class IO_Operations
extends java.lang.Object

Title: Performs IO Operations

Description:

Copyright: Copyright (c) 2004

Company: University of Surrey


Constructor Summary
IO_Operations()
           
 
Method Summary
static java.util.Hashtable loadSerializedObject(java.lang.String fileName)
          Loads the hashtable object from the file
static void main(java.lang.String[] args)
           
static void writeSerializedObjecttoFile(java.lang.String fileName, java.util.Hashtable htable)
          Writes a hashtable object to the specified file
static void writeTextFile(java.lang.String fileName, java.util.Hashtable wordFreqTable)
          Writes the given hashtable which is the output of TextProcessing class (word frequency pairs) to the specified file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IO_Operations

public IO_Operations()
Method Detail

writeSerializedObjecttoFile

public static void writeSerializedObjecttoFile(java.lang.String fileName,
                                               java.util.Hashtable htable)
Writes a hashtable object to the specified file

Parameters:
fileName - the file which the object will be written
htable - the hash table which will be written

loadSerializedObject

public static java.util.Hashtable loadSerializedObject(java.lang.String fileName)
Loads the hashtable object from the file

Parameters:
fileName - the input file
Returns:
the hashtable which was read

writeTextFile

public static void writeTextFile(java.lang.String fileName,
                                 java.util.Hashtable wordFreqTable)
Writes the given hashtable which is the output of TextProcessing class (word frequency pairs) to the specified file

Parameters:
fileName - the input file name
wordFreqTable - hashtable which consists of word frequency pairs (The keys are string type objects which show the words and their values' type is "Counter")

main

public static void main(java.lang.String[] args)