/[gzz]/gzz/lava/gzz/storm/impl/TransientPool.java
ViewVC logotype

Diff of /gzz/lava/gzz/storm/impl/TransientPool.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by benja, Tue Jan 14 15:43:06 2003 UTC revision 1.25 by benja, Sun Jan 19 00:24:36 2003 UTC
# Line 41  public class TransientPool extends Abstr Line 41  public class TransientPool extends Abstr
41       */       */
42      protected Map dbs;      protected Map dbs;
43    
44      protected class TransientBlockOutputStream extends AbstractBlockOutputStream      protected class TransientBlockOutputStream extends AbstractBlockOutputStream {
   
 {  
         protected ByteArrayOutputStream baos;  
   
45          protected TransientBlockOutputStream(Header822 header)          protected TransientBlockOutputStream(Header822 header)
46                                                        throws IOException {                                                        throws IOException {
47              super(new ByteArrayOutputStream(), header);              super(new ByteArrayOutputStream(), header);
             baos = (ByteArrayOutputStream)out;  
48          }          }
49    
50          public void close() throws IOException {          public void close() throws IOException {
51                ByteArrayOutputStream baos = (ByteArrayOutputStream)out;
52              block = new TransientBlock(makeIdFromDigest(),              block = new TransientBlock(makeIdFromDigest(),
53                                         baos.toByteArray(), header);                                         baos.toByteArray(), header);
54              blocks.put(block.getId(), block);              blocks.put(block.getId(), block);
# Line 69  public class TransientPool extends Abstr Line 65  public class TransientPool extends Abstr
65                                   Header822 header) throws IOException {                                   Header822 header) throws IOException {
66              super(id, header);              super(id, header);
67              this.bytes = bytes;              this.bytes = bytes;
68    
69                id.check(bytes);
70          }          }
71    
72          public InputStream getRawInputStream() throws IOException {          public InputStream getRawInputStream() throws IOException {

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26