All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vidcarboni.file-store.0.0.5.source-code.README.md Maven / Gradle / Ivy

Go to download

Enables the storage and retrieval of files on a file-system by arbitrary ID

The newest version!

File Store
--------


### What is this?

It's a component that allows you to store files by arbitrary ID.


### How do I use it?

Instantiate the `FileStore` class with a base path and manipulate content referenced by ID:

    fileStore = new FileStore(path);
    String id = "myarbitraryid";
    
    // Create
    FileInputStream content1 = new FileInputStream(file1);
    fileStore.create(id, content1);
    
    // Read
    InputStream stored = fileStore.read(id);
    
    // Update
    FileInputStream content2 = new FileInputStream(file2);
    fileStore.update(id, content2);
    
    // Delete
    fileStore.delete(id);

David Carboni

[https://github.com/davidcarboni/](https://github.com/davidcarboni/)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy