|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.compare.BufferedContent
Abstract implementation for a buffered IStreamContentAccessor.
Subclasses must implement the createStream method to connect the buffered content with a streamable source (e.g., a file).
As long as the contents of BufferedContent is only retrieved as an input stream (by means of getContents) and the BufferedContent is not modified (with setContent) no buffering takes place. Buffering starts when either method getContent or setContent is called.
Constructor Summary | |
protected | BufferedContent()
Creates a buffered stream content accessor. |
Method Summary | |
void | addContentChangeListener(IContentChangeListener listener)
Adds a content change listener to this notifier. |
protected abstract InputStream | createStream()
Creates and returns a stream for reading the contents. |
void | discardBuffer()
Discards the buffered content. |
protected void | fireContentChanged()
Notifies all registered IContentChangeListeners of a content change. |
byte[] | getContent()
Returns the contents as an array of bytes. |
InputStream | getContents()
Returns an open InputStream for this object which can be used to retrieve the object's content. |
void | removeContentChangeListener(IContentChangeListener listener)
Removes the given content changed listener from this notifier. |
void | setContent(byte[] contents)
Sets the contents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected BufferedContent()
Method Detail |
public InputStream getContents() throws CoreException
protected abstract InputStream createStream() throws CoreException
Subclasses must implement this method.
public void setContent(byte[] contents)
public byte[] getContent()
public void discardBuffer()
public void addContentChangeListener(IContentChangeListener listener)
public void removeContentChangeListener(IContentChangeListener listener)
protected void fireContentChanged()
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.