@Path(value="/") public class FileServer extends Object
| Constructor and Description |
|---|
FileServer() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getFile(String fileName)
Download file with streaming using a
File object in the response. |
javax.ws.rs.core.Response |
getFileFromInputStream(String fileName)
Download file with streaming using a
InputStream object in the response. |
javax.ws.rs.core.Response |
getFileUsingStreamingOutput(String fileName)
Download file with Streaming using using
StreamingOutput. |
void |
postFile(org.wso2.msf4j.HttpStreamer httpStreamer,
String fileName)
Upload a file with streaming.
|
@POST
@Path(value="/{fileName}")
public void postFile(@Context
org.wso2.msf4j.HttpStreamer httpStreamer,
@PathParam(value="fileName")
String fileName)
throws IOException
httpStreamer - Handle for setting the HttpStreamHandlercallback for streaming.fileName - Name of the file that was uploaded.IOException@GET
@Path(value="/{fileName}")
public javax.ws.rs.core.Response getFile(@PathParam(value="fileName")
String fileName)
File object in the response. Streaming is automatically handled
by MSF4J.fileName - Name of the file to be downloaded.@GET
@Path(value="/ip/{fileName}")
public javax.ws.rs.core.Response getFileFromInputStream(@PathParam(value="fileName")
String fileName)
throws FileNotFoundException
InputStream object in the response.
Streaming is automatically handled by MSF4J.fileName - Name of the file to be downloaded.FileNotFoundException@GET
@Path(value="/op/{fileName}")
public javax.ws.rs.core.Response getFileUsingStreamingOutput(@PathParam(value="fileName")
String fileName)
StreamingOutput.
You have more control over streaming chunk sizes when this method is used.fileName - Name of the file to be downloaded.Copyright © 2025 WSO2. All rights reserved.