Class PathDataSource
- java.lang.Object
-
- net.webpdf.wsclient.session.soap.documents.datasource.PathDataSource
-
- All Implemented Interfaces:
jakarta.activation.DataSource
public class PathDataSource extends Object implements jakarta.activation.DataSource
An instance ofPathDataSourceprepares the data of a given resource for further processing and usage by a webPDF webservice call.
-
-
Constructor Summary
Constructors Constructor Description PathDataSource(@NotNull Path path)Prepares the givenPathfor further processing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull StringgetContentType()Returns the MIME-type of the contained resource.@NotNull InputStreamgetInputStream()Returns theInputStreamcontaining the resource at the selectedPath.@NotNull StringgetName()Returns the name of the contained resource.@NotNull OutputStreamgetOutputStream()Returns theOutputStreamto the selectedPath.
-
-
-
Constructor Detail
-
PathDataSource
public PathDataSource(@NotNull @NotNull Path path) throws IOExceptionPrepares the givenPathfor further processing.- Parameters:
path- anPathcontaining the resource.- Throws:
IOException
-
-
Method Detail
-
getInputStream
@NotNull public @NotNull InputStream getInputStream() throws IOException
Returns theInputStreamcontaining the resource at the selectedPath.- Specified by:
getInputStreamin interfacejakarta.activation.DataSource- Returns:
- The
InputStreamcontaining the resource data. - Throws:
IOException- Shall be thrown, should thePathnot be readable.
-
getOutputStream
@NotNull public @NotNull OutputStream getOutputStream() throws IOException
Returns theOutputStreamto the selectedPath.- Specified by:
getOutputStreamin interfacejakarta.activation.DataSource- Returns:
- The
OutputStreamto the selectedPath. - Throws:
IOException- Shall be thrown, should thePathnot be writable.
-
getContentType
@NotNull public @NotNull String getContentType()
Returns the MIME-type of the contained resource.- Specified by:
getContentTypein interfacejakarta.activation.DataSource- Returns:
- The MIME-type of the contained resource.
-
getName
@NotNull public @NotNull String getName()
Returns the name of the contained resource.- Specified by:
getNamein interfacejakarta.activation.DataSource- Returns:
- The name of the contained resource.
-
-