Documentation of 'edu.rit.pj.cluster.BackendFileOutputStream' Java class
BackendFileOutputStream
edu.rit.pj.cluster

Class BackendFileOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable


    public class BackendFileOutputStream
    extends java.io.OutputStream
    Class BackendFileOutputStream provides an object in a job backend process that writes a sequential file in the job frontend process. A backend file output stream is not constructed directly, rather it is created by a factory method in class BackendFileWriter.

    Note: Class BackendFileOutputStream does not do any buffering. Each method call sends a message to and receives a message from the job frontend. Consider layering a BufferedOutputStream on top of the BackendFileOutputStream.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Close this output stream.
      void flush()
      Flush this output stream.
      void write(byte[] buf)
      Write the given byte array to this output stream.
      void write(byte[] buf, int off, int len)
      Write a portion of the given byte array to this output stream.
      void write(int b)
      Write the given byte to this output stream.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • write

        public void write(int b)
                   throws java.io.IOException
        Write the given byte to this output stream. Only the least significant eight bits are written.
        Specified by:
        write in class java.io.OutputStream
        Parameters:
        b - Byte.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • write

        public void write(byte[] buf)
                   throws java.io.IOException
        Write the given byte array to this output stream.
        Overrides:
        write in class java.io.OutputStream
        Parameters:
        buf - Byte array.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if buf is null.
        java.io.IOException - Thrown if an I/O error occurred.
      • write

        public void write(byte[] buf,
                          int off,
                          int len)
                   throws java.io.IOException
        Write a portion of the given byte array to this output stream.
        Overrides:
        write in class java.io.OutputStream
        Parameters:
        buf - Byte array.
        off - Index of first byte to write.
        len - Number of bytes to write.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if buf is null.
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if off < 0, len < 0, or off+len > buf.length.
        java.io.IOException - Thrown if an I/O error occurred.
      • flush

        public void flush()
                   throws java.io.IOException
        Flush this output stream.
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • close

        public void close()
                   throws java.io.IOException
        Close this output stream.
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class java.io.OutputStream
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.