public class BoxFileVersion extends BoxResource
BoxResource.Info
Constructor and Description |
---|
BoxFileVersion(BoxAPIConnection api,
String json,
String fileID)
Constructs a BoxFileVersion from a JSON string.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes this version of the file.
|
void |
download(OutputStream output)
Downloads this version of the file to a given OutputStream.
|
void |
download(OutputStream output,
ProgressListener listener)
Downloads this version of the file to a given OutputStream while reporting the progress to a ProgressListener.
|
Date |
getCreatedAt()
Gets the time that this version of the file was created.
|
Date |
getModifiedAt()
Gets the time that this version of the file was modified.
|
BoxUser.Info |
getModifiedBy()
Gets information about the user who last modified this version of the file.
|
String |
getName()
Gets the name of this version of the file.
|
String |
getSha1()
Gets the SHA1 hash of this version of the file.
|
long |
getSize()
Gets the size of this version of the file.
|
void |
promote()
Promotes this version of the file to be the latest version.
|
equals, getAPI, getID, hashCode
public BoxFileVersion(BoxAPIConnection api, String json, String fileID)
api
- the API connection to be used by the file.json
- the JSON encoded file version.fileID
- the ID of the file.public String getSha1()
public String getName()
public long getSize()
public Date getCreatedAt()
public Date getModifiedAt()
public BoxUser.Info getModifiedBy()
public void delete()
public void download(OutputStream output)
output
- the stream to where the file will be written.public void download(OutputStream output, ProgressListener listener)
output
- the stream to where the file will be written.listener
- a listener for monitoring the download's progress.public void promote()