commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dakota Jack <dakota.j...@gmail.com>
Subject Re: [Fileupload] Progress bar
Date Thu, 23 Dec 2004 21:33:30 GMT
public class CrackWillowOutputStream
    extends CommonsDeferredFileOutputStream {
  private Vector  listeners;
  private boolean isFormField;

  public CrackWillowOutputStream(int     threshold,
                                 File    outputFile,
                                 Vector  listeners,
                                 boolean isFormField) {
    super(threshold, outputFile);
    this.listeners = listeners;
    this.isFormField = isFormField;
  }

  public void write(byte data[], int i, int j)
      throws IOException {
    super.write(data, i, j);
    if((listeners != null) && (! isFormField)) {
      for(int k = 0; k < listeners.size(); k++) {
        UploadListener listener = (UploadListener)listeners.elementAt(k);
        listener.dataRead(j);
      }
    }
  }
}



On Thu, 23 Dec 2004 21:20:58 +0100, Nicolas Maujean
<nmaujean@hotmail.com> wrote:
> how ?
> 
> ----- Original Message -----
> From: "Dakota Jack" <dakota.jack@gmail.com>
> To: "Jakarta Commons Dev List" <commons-dev@jakarta.apache.org>
> Sent: Thursday, December 23, 2004 9:08 PM
> Subject: RE: [Fileupload] Progress bar
> 
> > >"I'm not sure there's even been community demand for a low-level API
> > like the one you \
> > >pointed out, but there certainly has been lots of demand (in my
> > experience) for a \
> > >means of reliably obtaining a live count of "bytes read/bytes
> > written" to/from the \
> > >i/o streams."
> > >
> > >Thank you for listening,
> >
> > >Eric H. Jung
> > >Russell/Mellon Analytical Services
> > >1-617-382-1373
> > >Everett, MA, USA
> >
> > Don't know if this is still of interest, but this sort of
> > functionality is available with the commons-upload as it presently
> > stands.  I do it with my code and commons-upload.
> >
> > Jack
> >
> >
> > --
> > ------------------------------
> >
> > "You can lead a horse to water but you cannot make it float on its back."
> >
> > ~Dakota Jack~
> >
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
> crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > -----------------------------------------------
> >
> > "This message may contain confidential and/or privileged information.
> > If you are not the addressee or authorized to receive this for the
> > addressee, you must not use, copy, disclose, or take any action based
> > on this message or any information herein. If you have received this
> > message in error, please advise the sender immediately by reply e-mail
> > and delete this message. Thank you for your cooperation."
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> 


-- 
------------------------------

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-----------------------------------------------

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message