1 26 27 package it.stefanochizzolini.clown.bytes; 28 29 import java.io.EOFException ; 30 31 35 public interface IInputStream 36 { 37 40 long getLength( 41 ); 42 43 46 long getPosition( 47 ); 48 49 52 int hashCode( 53 ); 54 55 59 void read( 60 byte[] data 61 ) 62 throws EOFException ; 63 64 70 void read( 71 byte[] data, 72 int offset, 73 int length 74 ) 75 throws EOFException ; 76 77 81 byte readByte( 82 ) 83 throws EOFException ; 84 85 89 int readInt( 90 ) 91 throws EOFException ; 92 93 97 String readLine( 98 ) 99 throws EOFException ; 100 101 105 short readShort( 106 ) 107 throws EOFException ; 108 109 114 String readString( 115 int length 116 ) 117 throws EOFException ; 118 119 123 int readUnsignedByte( 124 ) 125 throws EOFException ; 126 127 131 int readUnsignedShort( 132 ) 133 throws EOFException ; 134 135 138 void seek( 139 long offset 140 ); 141 142 145 void setPosition( 146 long value 147 ); 148 149 152 void skip( 153 long offset 154 ); 155 156 159 byte[] toByteArray( 160 ); 161 } | Popular Tags |