/** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param in an inputstream containing the file's data * @param filename the file name as stored in the db * @param closeStreamOnPersist indicate the passed in input stream should be closed once the data chunk persisted * @return a gridfs input file */ public GridFSInputFile createFile(final InputStream in, final String filename, final boolean closeStreamOnPersist) { return new GridFSInputFile(this, in, filename, closeStreamOnPersist); }
/** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param in an inputstream containing the file's data * @param filename the file name as stored in the db * @return a gridfs input file */ public GridFSInputFile createFile(final InputStream in, final String filename) { return new GridFSInputFile(this, in, filename); }
/** * Creates a file entry. * * @param filename the file name as stored in the db * @return a gridfs input file * @see GridFS#createFile() */ public GridFSInputFile createFile(final String filename) { return new GridFSInputFile(this, filename); }
/** * This method creates an empty {@link GridFSInputFile} instance. On this instance an {@link java.io.OutputStream} can be obtained using * the {@link GridFSInputFile#getOutputStream()} method. You can still call {@link GridFSInputFile#setContentType(String)} and {@link * GridFSInputFile#setFilename(String)}. The file will be completely written and closed after calling the {@link * java.io.OutputStream#close()} method on the output stream. * * @return GridFS file handle instance. */ public GridFSInputFile createFile() { return new GridFSInputFile(this); }
/** * This method creates an empty {@link GridFSInputFile} instance. On this instance an {@link java.io.OutputStream} can be obtained using * the {@link GridFSInputFile#getOutputStream()} method. You can still call {@link GridFSInputFile#setContentType(String)} and {@link * GridFSInputFile#setFilename(String)}. The file will be completely written and closed after calling the {@link * java.io.OutputStream#close()} method on the output stream. * * @return GridFS file handle instance. */ public GridFSInputFile createFile() { return new GridFSInputFile(this); }
/** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param in an inputstream containing the file's data * @param filename the file name as stored in the db * @param closeStreamOnPersist indicate the passed in input stream should be closed once the data chunk persisted * @return a gridfs input file */ public GridFSInputFile createFile(final InputStream in, final String filename, final boolean closeStreamOnPersist) { return new GridFSInputFile(this, in, filename, closeStreamOnPersist); }
/** * Creates a file entry. * * @param filename the file name as stored in the db * @return a gridfs input file * @see GridFS#createFile() */ public GridFSInputFile createFile(final String filename) { return new GridFSInputFile(this, filename); }
/** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param in an inputstream containing the file's data * @param filename the file name as stored in the db * @return a gridfs input file */ public GridFSInputFile createFile(final InputStream in, final String filename) { return new GridFSInputFile(this, in, filename); }