|
org.netbeans.modules.diff/1 1.18.0 42 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.diff.StreamSource
public abstract class StreamSource
This class provides streams and information about them to be used by diff and merge services.
Constructor Summary | |
---|---|
StreamSource()
|
Method Summary | |
---|---|
void |
close()
Close the stream source. |
abstract Reader |
createReader()
Create a reader, that reads the source. |
static StreamSource |
createSource(String name,
String title,
String MIMEType,
File file)
Create the default implementation of StreamSource , that has
just reader and writer from/to a file. |
static StreamSource |
createSource(String name,
String title,
String MIMEType,
Reader r)
Create the default implementation of StreamSource , that has
just reader and no writer. |
abstract Writer |
createWriter(Difference[] conflicts)
Create a writer, that writes to the source. |
Lookup |
getLookup()
Source lookup that may define the content of this source. |
abstract String |
getMIMEType()
Get the MIME type of the source. |
abstract String |
getName()
Get the name of the source. |
abstract String |
getTitle()
Get the title of the source. |
boolean |
isEditable()
Hint for a diff visualizer about editability of this source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StreamSource()
Method Detail |
---|
public abstract String getName()
public abstract String getTitle()
public abstract String getMIMEType()
public boolean isEditable()
public Lookup getLookup()
FileObject
- in this case, the content of the source is defined
by calling DataObject.find(fileObject).openDocument(). If the source is editable then it is
saved back via SaveCookie.save() when the Diff component closes.
Document
- in this case, the content of the source is defined
by this Document and the source will NOT be editable.
public abstract Reader createReader() throws IOException
IOException
public abstract Writer createWriter(Difference[] conflicts) throws IOException
conflicts
- The list of conflicts remaining in the source.
Can be null
if there are no conflicts.
null
, when no writer can be created.
IOException
public void close()
public static StreamSource createSource(String name, String title, String MIMEType, Reader r)
StreamSource
, that has
just reader and no writer.
public static StreamSource createSource(String name, String title, String MIMEType, File file)
StreamSource
, that has
just reader and writer from/to a file.
|
org.netbeans.modules.diff/1 1.18.0 42 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |