Package jcifs.smb

Class SmbFileOutputStream

java.lang.Object
java.io.OutputStream
jcifs.smb.SmbFileOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class SmbFileOutputStream extends OutputStream
This OutputStream can write bytes to a file on an SMB file server.
  • Constructor Details

  • Method Details

    • close

      public void close() throws IOException
      Closes this output stream and releases any system resources associated with it.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException - if a network error occurs
    • write

      public void write(int b) throws IOException
      Writes the specified byte to this file output stream.
      Specified by:
      write in class OutputStream
      Throws:
      IOException - if a network error occurs
    • write

      public void write(byte[] b) throws IOException
      Writes b.length bytes from the specified byte array to this file output stream.
      Overrides:
      write in class OutputStream
      Throws:
      IOException - if a network error occurs
    • isOpen

      public boolean isOpen()
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Writes len bytes from the specified byte array starting at offset off to this file output stream.
      Overrides:
      write in class OutputStream
      Parameters:
      b - The array
      Throws:
      IOException - if a network error occurs
    • writeDirect

      public void writeDirect(byte[] b, int off, int len, int flags) throws IOException
      Just bypasses TransWaitNamedPipe - used by DCERPC bind.
      Throws:
      IOException