|
The class's members were also changed from protected to private. Probably a good idea but there's no setters for _metadata available even to subclasses.
C:\bin\install\servers\mongodb>javap -private -classpath ./mongo-0.8.1.jar com.m
ongodb.util.gridfs.GridFSObject
Compiled from "GridFSObject.java"
public class com.mongodb.util.gridfs.GridFSObject extends java.lang.Object{
private com.mongodb.ObjectId _id;
private java.lang.String _filename;
private java.lang.String _contentType;
private long _length;
private int _chunkSize;
private java.util.Date _uploadDate;
private java.util.List _aliases;
private com.mongodb.DBObject _metadata;
private byte[] _myBuffer;
private java.io.InputStream _inStream;
private int _nextChunkID;
private com.mongodb.util.gridfs.GridFS _gridfs;
private com.mongodb.DBCursor _chunkCursor;
public com.mongodb.util.gridfs.GridFSObject(java.lang.String, java.io.InputS
tream);
public com.mongodb.util.gridfs.GridFSObject(com.mongodb.util.gridfs.GridFS,
com.mongodb.DBObject);
public com.mongodb.util.gridfs.GridFSObject(com.mongodb.util.gridfs.GridFS,
com.mongodb.DBObject, com.mongodb.DBObject);
public java.io.InputStream getInputStream();
protected com.mongodb.util.gridfs.GridFSChunk getNextChunkFromDB();
protected com.mongodb.util.gridfs.GridFSChunk getNextChunkFromStream()
throws java.io.IOException;
public java.lang.String getFilename();
public void setFilename(java.lang.String);
public java.lang.String getContentType();
public void setContentType(java.lang.String);
protected void setLength(long);
public com.mongodb.ObjectId getID();
public com.mongodb.DBObject getMetadata();
public com.mongodb.DBObject getDBObject();
}
|
|
please reopen.... looks like it is possible to read metadata but not write metadata. There are still some things missing:
1) GridFSObject has a constructor (GridFS, DBObject, DBObject metadata) as an alternative to constructtor (GridFS, DBObject), but not a constructor (String, InputStream, DBObject metadata) as an alternative to constructor (String, InputStream). By the way, what is the proper use for the different constructors? The String/InputStream one makes sense (then you call GridFS.write(gridFSObject) on the GridFSObject you created, but I can't make heads or tails of the (GridFS, DBObject) constructor. Does it automatically write to the GridFS in question? What data gets stored?
2) GridFSObject.getMetadata() exists, but not GridFSObject.setMetadata()
|