}\r
}\r
\r
- @Override\r
- public int read(byte[] b, int off, int len) throws IOException\r
- {\r
- if (b == null) {\r
- throw new NullPointerException();\r
- } else if (off < 0 || len < 0 || len > b.length - off) {\r
- throw new IndexOutOfBoundsException();\r
- } else if (len == 0) {\r
- return 0;\r
- }\r
-\r
- int c = read();\r
- if (c == -1) {\r
- return -1;\r
- }\r
- b[off] = (byte)c;\r
-\r
- int i = 1;\r
- try {\r
- for (; i < len ; i++) {\r
- c = read();\r
- if (c == -1) {\r
- break;\r
- }\r
- b[off + i] = (byte)c;\r
- }\r
- } catch (IOException ee) {\r
- }\r
- return i;\r
- }\r
-\r
/* (non-Javadoc)\r
* @see java.io.InputStream#read()\r
*/\r