Class NoBodyOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

@Deprecated(forRemoval=true, since="Servlet 6.0") class NoBodyOutputStream extends ServletOutputStream
Deprecated, for removal: This API element is subject to removal in a future version.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    (package private) static ThreadLocal<Boolean>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    private static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    private static ResourceBundle
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    (package private) int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns true if data can be written without blocking else returns false.
    (package private) void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Instructs the ServletOutputStream to invoke the provided WriteListener when it is possible to write
    void
    write(byte[] buf, int offset, int len)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    write(int b)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class jakarta.servlet.ServletOutputStream

    print, print, print, print, print, print, print, println, println, println, println, println, println, println, println

    Methods inherited from class java.io.OutputStream

    close, nullOutputStream, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LSTRING_FILE

      private static final String LSTRING_FILE
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • lStrings

      private static ResourceBundle lStrings
      Deprecated, for removal: This API element is subject to removal in a future version.
    • disableFlush

      static ThreadLocal<Boolean> disableFlush
      Deprecated, for removal: This API element is subject to removal in a future version.
    • contentLength

      private int contentLength
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • NoBodyOutputStream

      NoBodyOutputStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • reset

      void reset()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getContentLength

      int getContentLength()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • write

      public void write(int b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      write in class OutputStream
    • write

      public void write(byte[] buf, int offset, int len) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      write in class OutputStream
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException
    • isReady

      public boolean isReady()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: ServletOutputStream
      Returns true if data can be written without blocking else returns false.

      If this method returns false and a WriteListener has been set with ServletOutputStream.setWriteListener(WriteListener), then container will subsequently invoke WriteListener.onWritePossible() once a write operation becomes possible without blocking. Other than the initial call, WriteListener.onWritePossible() will only be called if and only if this method is called and returns false.

      Specified by:
      isReady in class ServletOutputStream
      Returns:
      true if data can be written without blocking, otherwise returns false.
      See Also:
    • setWriteListener

      public void setWriteListener(WriteListener writeListener)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: ServletOutputStream
      Instructs the ServletOutputStream to invoke the provided WriteListener when it is possible to write
      Specified by:
      setWriteListener in class ServletOutputStream
      Parameters:
      writeListener - the WriteListener that should be notified when it's possible to write