1 /* Copyright (C) 2004 Versant Inc. http://www.db4o.com */ 2 3 using System; 4 5 namespace Sharpen.IO 6 { 7 public class BufferedInputStream : IInputStream 8 { 9 private IInputStream _stream; 10 BufferedInputStream(IInputStream stream)11 public BufferedInputStream(IInputStream stream) 12 { 13 _stream = stream; 14 } 15 BufferedInputStream(IInputStream stream, int bufferSize)16 public BufferedInputStream(IInputStream stream, int bufferSize) 17 { 18 _stream = stream; 19 } 20 Read()21 public int Read() 22 { 23 return _stream.Read(); 24 } 25 Read(byte[] bytes)26 public int Read(byte[] bytes) 27 { 28 return _stream.Read(bytes); 29 } 30 Read(byte[] bytes, int offset, int length)31 public int Read(byte[] bytes, int offset, int length) 32 { 33 return _stream.Read(bytes, offset, length); 34 } 35 Close()36 public void Close() 37 { 38 _stream.Close(); 39 } 40 } 41 } 42