3
Copyright (C) 1999 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
14
#include "inputStream.h"
15
#include "../util/mmx.h"
17
InputStream::InputStream() {
18
timeStampArray=new TimeStampArray((char*)"Input",3000);
19
urlBuffer=new DynBuffer(20);
20
// we call mm_support() here because it is the only position
21
// where we gurantee that not threads are
22
// running (the call is not thread safe)
23
// afer the call we never execute the asm part again
24
// and everything is fine
30
InputStream::~InputStream() {
31
delete timeStampArray;
37
int InputStream::open(const char* dest) {
38
cout << "direct virtual call InputStream::open:"<<dest<<endl;
43
void InputStream::close() {
44
cout << "direct virtual call InputStream::close"<<endl;
49
int InputStream::isOpen() {
50
cout << "direct virtual call InputStream::isOpen"<<endl;
56
int InputStream::eof() {
57
cout << "direct virtual call InputStream::eof"<<endl;
63
int InputStream::read(char* ,int ) {
64
cout << "direct virtual call InputStream::read"<<endl;
70
int InputStream::seek(long bytePos) {
71
cout << "direct virtual call InputStream::seek:"<<bytePos<<endl;
76
void InputStream::clear() {
77
cout << "direct virtual call InputStream::clear:"<<endl;
82
long InputStream::getByteLength() {
83
cout << "direct virtual call InputStream::getByteLength"<<endl;
88
long InputStream::getBytePosition() {
89
cout << "direct virtual call InputStream::getBytePosition"<<endl;
94
void InputStream::insertTimeStamp(TimeStamp* src,long key,int len) {
95
timeStampArray->insertTimeStamp(src,key,len);
98
TimeStamp* InputStream::getTimeStamp(long key) {
99
return timeStampArray->getTimeStamp(key);
103
int InputStream::bytesUntilNext(long key) {
104
return timeStampArray->bytesUntilNext(key);
107
void InputStream::print() {
108
cout << "direct virtual call InputStream::print"<<endl;
115
char* InputStream::getUrl() {
116
return urlBuffer->getData();
120
void InputStream::setUrl(const char* url) {
123
urlBuffer->append(url);