org.ogf.saga.file
Class FileOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.ogf.saga.file.FileOutputStream
All Implemented Interfaces:
Closeable, Flushable, Cloneable, SagaObject, Async

public abstract class FileOutputStream
extends OutputStream
implements SagaObject, Async

Since Java programmers are used to streams, the Java language bindings of SAGA provide them. In contrast to everything else in the language bindings, this is an abstract class, not an interface, because it is supposed to be a java.io.OutputStream (which is a class, not an interface). Implementations should redefine methods of java.io.OutputStream.


Field Summary
 
Fields inherited from interface org.ogf.saga.SagaObject
NO_WAIT, WAIT_FOREVER
 
Constructor Summary
FileOutputStream()
           
 
Method Summary
 Object clone()
          Clone is mentioned here because the inherited Object.clone() cannot hide the public version in SagaObject.clone().
abstract  Task<FileOutputStream,Void> close(TaskMode mode)
          Creates a task that closes this stream.
abstract  Task<FileOutputStream,Void> flush(TaskMode mode)
          Creates a task that flushes this stream.
 Task<FileOutputStream,Void> write(TaskMode mode, byte[] buf)
          Creates a task that writes a buffer to this stream.
abstract  Task<FileOutputStream,Void> write(TaskMode mode, byte[] buf, int off, int len)
          Creates a task that writes (part of) a buffer to this stream.
abstract  Task<FileOutputStream,Void> write(TaskMode mode, int b)
          Creates a task that writes a byte to this stream.
 
Methods inherited from class java.io.OutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ogf.saga.SagaObject
getId, getSession
 

Constructor Detail

FileOutputStream

public FileOutputStream()
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Clone is mentioned here because the inherited Object.clone() cannot hide the public version in SagaObject.clone().

Specified by:
clone in interface SagaObject
Overrides:
clone in class Object
Returns:
the clone.
Throws:
CloneNotSupportedException - when the clone method is not supported.

write

public abstract Task<FileOutputStream,Void> write(TaskMode mode,
                                                  int b)
                                           throws NotImplementedException
Creates a task that writes a byte to this stream. See OutputStream.write(int).

Parameters:
mode - the task mode.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.

write

public abstract Task<FileOutputStream,Void> write(TaskMode mode,
                                                  byte[] buf,
                                                  int off,
                                                  int len)
                                           throws NotImplementedException
Creates a task that writes (part of) a buffer to this stream. See OutputStream.write(byte[], int, int).

Parameters:
mode - the task mode.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.

write

public Task<FileOutputStream,Void> write(TaskMode mode,
                                         byte[] buf)
                                  throws NotImplementedException
Creates a task that writes a buffer to this stream. See OutputStream.write(byte[]).

Parameters:
mode - the task mode.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.

flush

public abstract Task<FileOutputStream,Void> flush(TaskMode mode)
                                           throws NotImplementedException
Creates a task that flushes this stream. See OutputStream.flush().

Parameters:
mode - the task mode.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.

close

public abstract Task<FileOutputStream,Void> close(TaskMode mode)
                                           throws NotImplementedException
Creates a task that closes this stream. See OutputStream.close().

Parameters:
mode - the task mode.
Throws:
NotImplementedException - is thrown if the implementation does not provide an implementation of this method.


Copyright © 2014 Open Grid Forum. All rights reserved.