Example usage for com.mongodb.gridfs GridFS DEFAULT_CHUNKSIZE

List of usage examples for com.mongodb.gridfs GridFS DEFAULT_CHUNKSIZE

Introduction

In this page you can find the example usage for com.mongodb.gridfs GridFS DEFAULT_CHUNKSIZE.

Prototype

int DEFAULT_CHUNKSIZE

To view the source code for com.mongodb.gridfs GridFS DEFAULT_CHUNKSIZE.

Click Source Link

Document

File's chunk size

Usage

From source file:cn.vlabs.clb.server.storage.mongo.extend.MyGridFSInputFile.java

License:Apache License

public MyGridFSInputFile(MyGridFS fs, InputStream in, String filename, boolean closeStreamOnPersist) {
    _fs = fs;/*from   w w  w . jav  a2 s  .c o  m*/
    _in = in;
    _filename = filename;
    _closeStreamOnPersist = closeStreamOnPersist;

    _id = new ObjectId();
    _chunkSize = GridFS.DEFAULT_CHUNKSIZE;
    _uploadDate = new Date();
    //        try {
    //            _messageDigester = MessageDigest.getInstance("MD5");
    //        } catch (NoSuchAlgorithmException e) {
    //            throw new RuntimeException("No MD5!");
    //        }
    ////        _messageDigester.reset();
    _buffer = new byte[(int) _chunkSize];
}

From source file:com.bugull.mongo.fs.BuguFSFactory.java

License:Apache License

public BuguFS create() {
    return create(GridFS.DEFAULT_BUCKET, GridFS.DEFAULT_CHUNKSIZE);
}

From source file:com.bugull.mongo.fs.BuguFSFactory.java

License:Apache License

public BuguFS create(String bucketName) {
    return create(bucketName, GridFS.DEFAULT_CHUNKSIZE);
}