1 19 package org.fjank.jcache; 20 21 import java.io.ByteArrayOutputStream ; 22 import java.io.IOException ; 23 24 29 public class CacheOutputStream extends ByteArrayOutputStream { 30 private final StreamCacheObject streamObject; 31 32 public CacheOutputStream(StreamCacheObject strObj) { 33 super(); 34 this.streamObject = strObj; 35 } 36 37 39 public void close() throws IOException { 40 super.close(); 41 streamObject.setReferent(this.toByteArray()); 42 } 43 StreamCacheObject getStreamObject() { 44 return streamObject; 45 } 46 47 } 48 | Popular Tags |