1 29 30 package com.caucho.quercus.resources; 31 32 import com.caucho.quercus.env.ResourceValue; 33 import com.caucho.quercus.env.StringValue; 34 35 import java.io.IOException ; 36 37 40 public class StreamResource extends ResourceValue { 41 44 public int read() 45 throws IOException 46 { 47 return -1; 48 } 49 50 53 public int read(byte []buffer, int offset, int length) 54 throws IOException 55 { 56 return -1; 57 } 58 59 62 public boolean readOptionalLinefeed() 63 throws IOException 64 { 65 return false; 66 } 67 68 71 public StringValue readLine() 72 throws IOException 73 { 74 return null; 75 } 76 77 80 public int write(byte []buffer, int offset, int length) 81 throws IOException 82 { 83 return -1; 84 } 85 86 89 public void print(char ch) 90 throws IOException 91 { 92 print(String.valueOf(ch)); 93 } 94 95 98 public void print(String s) 99 throws IOException 100 { 101 } 102 103 106 public boolean isEOF() 107 { 108 return true; 109 } 110 111 114 public void flush() 115 { 116 } 117 118 121 public long getPosition() 122 { 123 return 0; 124 } 125 126 129 public void close() 130 { 131 } 132 133 136 public void closeRead() 137 { 138 } 139 140 143 public void closeWrite() 144 { 145 } 146 } 147 148 | Popular Tags |