Class Data

java.lang.Object
org.cibseven.webapp.Data
All Implemented Interfaces:
jakarta.activation.DataSource, org.springframework.core.io.InputStreamSource

public class Data extends Object implements org.springframework.core.io.InputStreamSource, jakarta.activation.DataSource
  • Constructor Details

    • Data

      public Data(String rename, jakarta.activation.DataSource ds)
  • Method Details

    • from

      public static Data from(Path pth, String contentType)
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface jakarta.activation.DataSource
    • getName

      public String getName()
      Specified by:
      getName in interface jakarta.activation.DataSource
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Specified by:
      getOutputStream in interface jakarta.activation.DataSource
      Throws:
      IOException
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface jakarta.activation.DataSource
      Specified by:
      getInputStream in interface org.springframework.core.io.InputStreamSource
      Throws:
      IOException
    • streamTo

      public Path streamTo(@NonNull @NonNull Path path)
    • streamTo

      public <T extends OutputStream> T streamTo(@NonNull T out)