# Load from stream This article explains how to load a document from a Stream with GroupDocs.Viewer within your Java applications. You can load a document from a stream without saving it as a file on a disk. You can use this feature to load a document from different sources like a URL, FTP, and so on. To load a document from a stream, follow these steps: 1. Create document stream in any way you need. 2. Call the [Viewer](https://reference.groupdocs.com/viewer/java/com.groupdocs.viewer/Viewer) class constructor specifying the created stream as an argument. The following code snippet shows how to load a document from a stream: {{< tabs "example1">}} {{< tab "Java" >}} ```java import com.groupdocs.viewer.Viewer; import com.groupdocs.viewer.options.HtmlViewOptions; // ... try (Viewer viewer = new Viewer(inputStream)) { HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources(); viewer.view(viewOptions); } ``` {{< /tab >}} {{< /tabs >}} Please refer to the following pages for examples: ## Contents - [Load from FTP](https://docs.groupdocs.com/viewer/java/load-document-from-ftp.md) - [Load from Amazon S3 Storage](https://docs.groupdocs.com/viewer/java/load-document-from-amazon-s3-storage.md) - [Load from Azure Blob Storage](https://docs.groupdocs.com/viewer/java/load-document-from-azure-blob-storage.md)