Free Support Forum -

Groupdocs - Input Stream


Hi there,

In the below code sample, if I want to use InputStream instead of file Path , please advise how do I obtain the Groupdocs Path since Encoded path only accepts “file path”. I did try implementing the Custom Input Handler as stated in :±+Custom+Input+DataSource

but need more assistance as to how to proceed further.

ViewerHandler viewerHandler = null;

if (viewerHandler == null) {

final ServiceConfiguration config = new ServiceConfiguration(new Configuration());

viewerHandler = new ViewerHandler(config, new CustomInputDataHandler(config));


GroupDocsPath path = new EncodedPath(filePath, viewerHandler.getConfiguration());

String viewerId = “test”;

String initialFilePath = (path == null) ? “” : path.getPath();

String locale = viewerHandler.getLocale();

String viewerHeader = viewerHandler.getHeader();

String viewerScript = viewerHandler.getViewerScript(viewerId, initialFilePath, locale);


Thank you for your request.

If you use CustomInputDataHandler then you should modified this class to use Input stream instead file path. This class override current logic and you not need to modify HomeController class .

If you will have more questions please feel free to contact us .


Best regards,
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+