commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michele Mazzucco (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IO-92) new ThresholdingOutputStream implementation
Date Mon, 11 Sep 2006 07:43:25 GMT
     [ http://issues.apache.org/jira/browse/IO-92?page=all ]

Michele Mazzucco updated IO-92:
-------------------------------

    Attachment: DeferredPeriodicOutputStream.java
                DeferredPeriodicOutputStreamTest.java

Please find attached the class implementation and the related unit test

> new ThresholdingOutputStream implementation
> -------------------------------------------
>
>                 Key: IO-92
>                 URL: http://issues.apache.org/jira/browse/IO-92
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Streams/Writers
>    Affects Versions: 1.2
>         Environment: Windows XP SP2, jdk 1.5
>            Reporter: Michele Mazzucco
>         Attachments: DeferredPeriodicOutputStream.java, DeferredPeriodicOutputStreamTest.java
>
>
> I've extended the ThresholdingOutputStream class with a new class which
> behaves different from DeferredFileOutputStream:
> - when the stream is closed, the content stored in memory is *always* flushed to disk
(in DeferredFileOutputStream, instead, if the treshold
> is not reached data is lost)
> - DeferredFileOutputStream maintains data in memory only until the treshold value has
been reached, then it immediately writes every byte
> to disk. This new implementation, instead, caches treshold bytes in memory, and every
time that value is reached (that is, treshold, 2 * threshold, etc), it flushes data to disk.
In other words it acts as a cache.
> - It implements the java.io.DataOutput interface, that is, it provides utility methods
to write all primitive types (e.g. short, byte, char, int, float, long, double and String
in different formats)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
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