edu.mit.jwi
Interface IRAMDictionary

All Superinterfaces:
IClosable, IDictionary, IHasCharset, IHasLifecycle, IHasVersion, ILoadable, ILoadPolicy
All Known Implementing Classes:
RAMDictionary

public interface IRAMDictionary
extends IDictionary, ILoadPolicy, ILoadable

Interface that governs dictionaries that can be completely loaded into memory.

Since:
JWI 2.2.0
Version:
2.4.0
Author:
Mark A. Finlayson

Nested Class Summary
static class IRAMDictionary.FileInputStreamFactory
          Default implementation of the IRAMDictionary.IInputStreamFactory interface which creates an input stream from a specified File object.
static interface IRAMDictionary.IInputStreamFactory
          An input stream factory is used by certain constructors of the RAMDictionary class to provide source data to load the dictionary into memory from a stream.
static class IRAMDictionary.URLInputStreamFactory
          Default implementation of the IRAMDictionary.IInputStreamFactory interface which creates an input stream from a specified URL.
 
Nested classes/interfaces inherited from interface edu.mit.jwi.data.IHasLifecycle
IHasLifecycle.LifecycleState, IHasLifecycle.ObjectClosedException, IHasLifecycle.ObjectOpenException
 
Field Summary
 
Fields inherited from interface edu.mit.jwi.data.ILoadPolicy
BACKGROUND_LOAD, IMMEDIATE_LOAD, NO_LOAD
 
Method Summary
 void export(java.io.OutputStream out)
          Exports the in-memory contents of the to the specified output stream.
 
Methods inherited from interface edu.mit.jwi.IDictionary
getExceptionEntry, getExceptionEntry, getExceptionEntryIterator, getIndexWord, getIndexWord, getIndexWordIterator, getSenseEntry, getSenseEntryIterator, getSynset, getSynsetIterator, getWord, getWord, setCharset
 
Methods inherited from interface edu.mit.jwi.item.IHasVersion
getVersion
 
Methods inherited from interface edu.mit.jwi.data.IHasLifecycle
isOpen, open
 
Methods inherited from interface edu.mit.jwi.data.IClosable
close
 
Methods inherited from interface edu.mit.jwi.data.IHasCharset
getCharset
 
Methods inherited from interface edu.mit.jwi.data.ILoadPolicy
getLoadPolicy, setLoadPolicy
 
Methods inherited from interface edu.mit.jwi.data.ILoadable
isLoaded, load, load
 

Method Detail

export

void export(java.io.OutputStream out)
            throws java.io.IOException
Exports the in-memory contents of the to the specified output stream. This method flushes and closes the output stream when it is done writing the data.

Parameters:
out - the output stream to which the in-memory data will be written; may not be null
Throws:
java.io.IOException - if there is a problem writing the in-memory data to the output stream.
java.lang.IllegalStateException - if the dictionary has not been loaded into memory
java.lang.NullPointerException - if the output stream is null
Since:
JWI 2.4.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.