1 29 30 package com.caucho.quercus.lib.file; 31 32 import com.caucho.quercus.env.BinaryValue; 33 import com.caucho.quercus.env.StringValue; 34 35 import java.io.IOException ; 36 import java.io.InputStream ; 37 import java.io.UnsupportedEncodingException ; 38 39 42 public interface BinaryInput extends BinaryStream { 43 public static final int SEEK_SET = 0; 44 public static final int SEEK_CUR = 1; 45 public static final int SEEK_END = 2; 46 47 50 public InputStream getInputStream(); 51 52 55 public BinaryInput openCopy() 56 throws IOException ; 57 58 61 public int read() 62 throws IOException ; 63 64 67 public void unread() 68 throws IOException ; 69 70 73 public int read(byte []buffer, int offset, int length) 74 throws IOException ; 75 76 79 public BinaryValue read(int length) 80 throws IOException ; 81 82 85 public boolean readOptionalLinefeed() 86 throws IOException ; 87 88 91 public StringValue readLine(long length) 92 throws IOException ; 93 94 97 public long getPosition(); 98 99 102 public boolean setPosition(long offset); 103 104 107 public void close(); 108 109 112 public void closeRead(); 113 114 120 public void setEncoding(String encoding) 121 throws UnsupportedEncodingException ; 122 123 127 public long seek(long offset, int whence); 128 } 129 130 | Popular Tags |