public ObjectStat(String bucketName,String name,Date createdTime,long length,String etag,String contentType){
  this.bucketName=bucketName;
  this.name=name;
  this.contentType=contentType;
  this.createdTime=(Date)createdTime.clone();
  this.length=length;
  if (etag != null) {
    this.etag=etag.replaceAll("\"","");
  }
 else {
    this.etag="";
  }
}

public ObjectStat ( String bucketName , String name , Date createdTime , long length , String etag , String contentType ) { this . bucketName = bucketName ; this . name = name ; this . contentType = contentType ; this . createdTime = ( Date ) createdTime . clone ( ) ; this . length = length ; if ( etag != null ) { this . etag = etag . replaceAll ( "\"" , "" ) ; } else { this . etag = "" ; } }
creates objectstat with given bucket name , object name , created time , object length , etag and content type .
