/*
 * @(#)BufferedReader.h
 *
 * This file is part of webCDwriter - Network CD Writing.
 *
 * Copyright (C) 2002 Jörg P. M. Haeger
 *
 * webCDwriter is free software. See CDWserver.cpp for details.
 */

#ifndef BUFFEREDREADER_H
#define BUFFEREDREADER_H

class BufferedReader {
	int fd;
	char *buf;
	int size;
	int count;
	int pos;
	int markpos;
	int marklimit;
public:
	BufferedReader(int fd, int size = 4 * 1024);
	~BufferedReader();
	void mark(int readAheadLimit);
	int read();
	int ready(int timeout = 0);
	void reset();
};

#endif
