reader - } public byte Read () throws IOException { int...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.io.*; i class Reader { String fileName; S int counter; i byte[] data; b BufferedInputStream in; B public Reader(String fileName) throws FileNotFoundException { this.fileName=fileName; counter=0; data = new byte[512]; d in = new BufferedInputStream(new FileInputStream("c:\\temp\\"+fileName));
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } public byte Read () throws IOException { int i=in.available(); if(i<512){ byte g=new byte[i]; counter =in.read(g); in.close(); return g; } counter = in.read(data); if(counter == -1){ i in.close(); } return data; r } }...
View Full Document

This note was uploaded on 09/26/2009 for the course SCE Sysc3303 taught by Professor Marshall during the Summer '09 term at Carleton CA.

Page1 / 2

reader - } public byte Read () throws IOException { int...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online