|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.didion.jwnl.dictionary.file.AbstractDictionaryFile
net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
net.didion.jwnl.princeton.file.PrincetonObjectDictionaryFile
public class PrincetonObjectDictionaryFile
ObjectDictionaryFile that accesses files names with the Princeton dictionary file naming convention.
| Field Summary |
|---|
| Fields inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile |
|---|
COMMENT_HEADER |
| Constructor Summary | |
|---|---|
PrincetonObjectDictionaryFile()
|
|
PrincetonObjectDictionaryFile(String path,
POS pos,
DictionaryFileType fileType)
|
|
| Method Summary | |
|---|---|
boolean |
canRead()
|
boolean |
canWrite()
|
void |
close()
Close the file |
ObjectInputStream |
getInputStream()
|
ObjectOutputStream |
getOutputStream()
|
boolean |
isOpen()
Return true if the file is open |
DictionaryFile |
newInstance(String path,
POS pos,
DictionaryFileType fileType)
Create a new instance of the dictionary file |
protected void |
openFile(File path)
Here we try to be intelligent about opening streams. |
void |
openStreams()
Open the input and output streams. |
Object |
readObject()
Read and deserialize an object from the file |
void |
writeObject(Object obj)
Serialize and write an object ot the file. |
| Methods inherited from class net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile |
|---|
makeFilename |
| Methods inherited from class net.didion.jwnl.dictionary.file.AbstractDictionaryFile |
|---|
getFile, getFileType, getPOS, open |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile |
|---|
getFile, getFileType, getPOS, open |
| Constructor Detail |
|---|
public PrincetonObjectDictionaryFile()
public PrincetonObjectDictionaryFile(String path,
POS pos,
DictionaryFileType fileType)
| Method Detail |
|---|
public DictionaryFile newInstance(String path,
POS pos,
DictionaryFileType fileType)
DictionaryFile
newInstance in interface DictionaryFilepublic boolean isOpen()
DictionaryFile
isOpen in interface DictionaryFilepublic void close()
DictionaryFile
close in interface DictionaryFile
public void openStreams()
throws IOException
IOException
public ObjectInputStream getInputStream()
throws IOException
IOException
public ObjectOutputStream getOutputStream()
throws IOException
IOExceptionpublic boolean canRead()
public boolean canWrite()
public Object readObject()
throws IOException,
ClassNotFoundException
ObjectDictionaryFile
readObject in interface ObjectDictionaryFileIOException
ClassNotFoundException
public void writeObject(Object obj)
throws IOException
ObjectDictionaryFile
writeObject in interface ObjectDictionaryFileIOException
protected void openFile(File path)
throws IOException
openStreams.
openFile in class AbstractDictionaryFileIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||