org.netbeans.modules.diff/1 1.15.22 42

org.netbeans.api.diff
Class StreamSource

java.lang.Object
  extended by org.netbeans.api.diff.StreamSource

public abstract class StreamSource
extends Object

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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamSource

public StreamSource()
Method Detail

getName

public abstract String getName()
Get the name of the source.


getTitle

public abstract String getTitle()
Get the title of the source.


getMIMEType

public abstract String getMIMEType()
Get the MIME type of the source.


createReader

public abstract Reader createReader()
                             throws IOException
Create a reader, that reads the source.

Throws:
IOException

createWriter

public abstract Writer createWriter(Difference[] conflicts)
                             throws IOException
Create a writer, that writes to the source.

Parameters:
conflicts - The list of conflicts remaining in the source. Can be null if there are no conflicts.
Returns:
The writer or null, when no writer can be created.
Throws:
IOException

close

public void close()
Close the stream source. This method, is called when this object will never be asked for the streams any more and thus can release it's resources in this method.


createSource

public static StreamSource createSource(String name,
                                        String title,
                                        String MIMEType,
                                        Reader r)
Create the default implementation of StreamSource, that has just reader and no writer.


createSource

public 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.


org.netbeans.modules.diff/1 1.15.22 42

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.