Mercurial > projects > dwt2
comparison java/src/java/util/zip/InflaterInputStream.d @ 8:2847134a5fc0
more tango abstraction
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 05 Mar 2009 15:12:35 +0100 |
parents | 6dd524f61e62 |
children | 735224fcc45f |
comparison
equal
deleted
inserted
replaced
7:33be57450a23 | 8:2847134a5fc0 |
---|---|
10 version(Windows){ | 10 version(Windows){ |
11 version(build){ | 11 version(build){ |
12 pragma(link,"zlib"); | 12 pragma(link,"zlib"); |
13 } | 13 } |
14 } | 14 } |
15 version(TANGOSVN){ | 15 |
16 import tango.io.device.Conduit; | 16 import tango.io.device.Conduit; |
17 } else { | |
18 import tango.io.Conduit; | |
19 } | |
20 | 17 |
21 class InputStreamWrapper : tango.io.model.IConduit.InputStream { | 18 class InputStreamWrapper : tango.io.model.IConduit.InputStream { |
22 | 19 |
23 java.io.InputStream.InputStream istr; | 20 java.io.InputStream.InputStream istr; |
24 | 21 |
28 | 25 |
29 uint read (void[] dst){ | 26 uint read (void[] dst){ |
30 int res = istr.read( cast(byte[])dst ); | 27 int res = istr.read( cast(byte[])dst ); |
31 return res; | 28 return res; |
32 } | 29 } |
33 void[] load (void[] dst = null) { | |
34 return Conduit.load (this, dst); | |
35 } | |
36 | |
37 tango.io.model.IConduit.InputStream clear (){ | |
38 return this; | |
39 } | |
40 | 30 |
41 tango.io.model.IConduit.IConduit conduit (){ | 31 tango.io.model.IConduit.IConduit conduit (){ |
32 implMissing(__FILE__,__LINE__); | |
42 return null; | 33 return null; |
43 } | 34 } |
44 | 35 |
45 void close (){ | 36 void close (){ |
46 istr.close(); | 37 istr.close(); |
47 } | 38 } |
48 tango.io.model.IConduit.InputStream input (){ | 39 tango.io.model.IConduit.InputStream input (){ |
40 implMissing(__FILE__,__LINE__); | |
49 return null; | 41 return null; |
50 } | 42 } |
51 long seek (long offset, Anchor anchor = Anchor.Begin){ | 43 long seek (long offset, Anchor anchor = Anchor.Begin){ |
44 implMissing(__FILE__,__LINE__); | |
52 return 0; | 45 return 0; |
46 } | |
47 void[] load (size_t max = -1){ | |
48 implMissing(__FILE__,__LINE__); | |
49 return null; | |
50 } | |
51 IOStream flush (){ | |
52 implMissing(__FILE__,__LINE__); | |
53 return null; | |
53 } | 54 } |
54 } | 55 } |
55 | 56 |
56 public class InflaterInputStream : java.io.InputStream.InputStream { | 57 public class InflaterInputStream : java.io.InputStream.InputStream { |
57 | 58 |