/[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.4 by benja, Wed Nov 6 17:17:46 2002 UTC revision 1.5 by benja, Wed Nov 6 17:31:30 2002 UTC
# Line 17  public class TransientPool implements In Line 17  public class TransientPool implements In
17    
18      protected class TransientBlockOutputStream extends BlockOutputStream {      protected class TransientBlockOutputStream extends BlockOutputStream {
19          protected ByteArrayOutputStream baos;          protected ByteArrayOutputStream baos;
20            protected Header822 header;
21          protected Block block;          protected Block block;
22    
23          protected TransientBlockOutputStream() {          protected TransientBlockOutputStream(Header822 header) {
24              super(new ByteArrayOutputStream());              super(new ByteArrayOutputStream());
25              baos = (ByteArrayOutputStream)out;              baos = (ByteArrayOutputStream)out;
26                this.header = header;
27          }          }
28          public Block getBlock() { return block; }          public Block getBlock() { return block; }
29          public Header822 getHeader() { return null; }          public Header822 getHeader() { return null; }
30          public void close(){          public void close() {
31                  Header822 h = new SortedHeader822();                  block = new TransientBlock(baos.toByteArray(), header);
                 h.add("Content-type", "text/plain");  
                 block = new TransientBlock(baos.toByteArray(),h);  
32                  blocks.put(block.getId(),block);                  blocks.put(block.getId(),block);
33          }          }
34      }      }
# Line 37  public class TransientPool implements In Line 37  public class TransientPool implements In
37          protected byte[] bytes;          protected byte[] bytes;
38          protected Header822 h;          protected Header822 h;
39    
40          protected TransientBlock(byte[] b, Header822 h){          protected TransientBlock(byte[] b, Header822 h) {
41              bytes = b;              bytes = b;
42              this.h = h;              this.h = h;
43          }          }
# Line 58  public class TransientPool implements In Line 58  public class TransientPool implements In
58      public void delete(Block b) {}      public void delete(Block b) {}
59      public Set getIds() { return null; }      public Set getIds() { return null; }
60      public BlockOutputStream getBlockOutputStream(String contentType) {      public BlockOutputStream getBlockOutputStream(String contentType) {
61            Header822 hdr = new UniqueHeader822();
62          return new TransientBlockOutputStream();          hdr.add("Content-Type", contentType);
63            return new TransientBlockOutputStream(hdr);
64        }
65        public BlockOutputStream getBlockOutputStream(Header822 hdr) {
66            return null;
67      }      }
     public BlockOutputStream getBlockOutputStream(Header822 hdr) { return null; }  
68      public String getDefaultPoolName() { return null; }      public String getDefaultPoolName() { return null; }
69      public Set getPoolNames() { return null; }      public Set getPoolNames() { return null; }
70      public Pointer getPointer(String uri) { return null; }      public Pointer getPointer(String uri) { return null; }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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