|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.client.DataStream
public abstract class DataStream
The model of a datastream as it exists inside the editor. This class has getters and setters for the fields and bytes of a datastream while it is being edited.
| Field Summary | |
|---|---|
static int |
BASIS
Identifier for BASIS datastreams |
static ByteArrayInputStream |
EMPTY
Empty stream |
static int |
INLINE
Identifier for INLINE datastreams |
protected boolean |
m_dirty
Whether this datastream is dirty |
| Constructor Summary | |
|---|---|
DataStream(File tempDir,
String id)
Constructs a datastream with a given temporary directory to write itself to, and an identifier. |
|
| Method Summary | |
|---|---|
void |
clearData()
|
InputStream |
getData()
Gets an InputStream to the local copy of the datastream. |
String |
getId()
Gets the id of the datastream inside the object. |
String |
getMimeType()
Gets the mime type. |
long |
getSize()
Gets the size, in bytes. |
abstract int |
getType()
Returns INLINE or BASIS. |
boolean |
isDirty()
|
void |
setClean()
|
void |
setData(InputStream in)
Reads the bytes from the given InputStream as the data for
this digital object. |
void |
setMimeType(String mimeType)
Sets the mime type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ByteArrayInputStream EMPTY
public static final int INLINE
public static final int BASIS
protected boolean m_dirty
| Constructor Detail |
|---|
public DataStream(File tempDir,
String id)
| Method Detail |
|---|
public abstract int getType()
public String getId()
public String getMimeType()
public void setMimeType(String mimeType)
public long getSize()
public InputStream getData()
throws IOException
InputStream to the local copy of the datastream.
IOException
public void setData(InputStream in)
throws IOException
InputStream as the data for
this digital object. When finished, the InputStream is
closed.
IOExceptionpublic boolean isDirty()
public void setClean()
public void clearData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||