CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence.dto
Class BinaryStreamDto

java.lang.Object
  extended by com.intland.codebeamer.persistence.dto.base.IdentifiableDto
      extended by com.intland.codebeamer.persistence.dto.BinaryStreamDto
All Implemented Interfaces:
BaseDto, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class BinaryStreamDto
extends IdentifiableDto

DTO for storing/transferring binary data. This supposed to contain a single input stream, plus some other additional info like file name (the original), and the length.

Note: the stream inside can only be read only once!

See Also:
for helper methods for creation of instances., Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
IdentifiableDto.IdComparator
 
Constructor Summary
BinaryStreamDto()
           
BinaryStreamDto(java.lang.String fileName, java.lang.Long length, java.io.InputStream inputStream)
           
 
Method Summary
 byte[] getBytes()
           
 java.lang.String getFileName()
           
 java.io.InputStream getInputStream()
           
 java.lang.Long getLength()
           
 boolean isPersistent()
          Indicate if the DTO comes from database.
 void setBytes(byte[] bytes)
           
 void setFileName(java.lang.String fileName)
          Important: do not change, only for iBatis!
 void setInputStream(java.io.InputStream inputStream)
           
 void setLength(java.lang.Long length)
           
 void setPersistent(boolean persistent)
          Only change this flag if you are sure!
 java.lang.String toString()
          Overridden for debugging.
 
Methods inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto
clone, compare, compareInteger, compareTo, equals, equals, getId, hashCode, hashCode, setId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BinaryStreamDto

public BinaryStreamDto()

BinaryStreamDto

public BinaryStreamDto(java.lang.String fileName,
                       java.lang.Long length,
                       java.io.InputStream inputStream)
Method Detail

getFileName

public java.lang.String getFileName()

setFileName

public void setFileName(java.lang.String fileName)
Important: do not change, only for iBatis!


getLength

public java.lang.Long getLength()

setLength

public void setLength(java.lang.Long length)

getInputStream

public java.io.InputStream getInputStream()

setInputStream

public void setInputStream(java.io.InputStream inputStream)

getBytes

public byte[] getBytes()

setBytes

public void setBytes(byte[] bytes)

isPersistent

public boolean isPersistent()
Indicate if the DTO comes from database. It will only be saved to database if this flag is false!

Returns:
whether this DTO is persistent.

setPersistent

public void setPersistent(boolean persistent)
Only change this flag if you are sure!


toString

public java.lang.String toString()
Overridden for debugging.

Overrides:
toString in class IdentifiableDto

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.