1 22 package org.xsocket; 23 24 import java.io.IOException ; 25 import java.io.UnsupportedEncodingException ; 26 27 28 33 public interface IDataSource { 34 35 36 37 43 public byte readByte() throws IOException ; 44 45 46 47 53 public short readShort() throws IOException ; 54 55 56 62 public int readInt() throws IOException ; 63 64 65 71 public long readLong() throws IOException ; 72 73 74 80 public double readDouble() throws IOException ; 81 82 83 84 91 public byte[] readBytesByLength(int length) throws IOException ; 92 93 94 95 96 97 105 public String readStringByLength(int length) throws IOException , UnsupportedEncodingException ; 106 107 108 109 118 public String readStringByLength(int length, String encoding) throws IOException , UnsupportedEncodingException ; 119 120 121 129 public String readStringByDelimiter(String delimiter) throws IOException , UnsupportedEncodingException ; 130 131 132 142 public String readStringByDelimiter(String delimiter, int maxLength) throws IOException , UnsupportedEncodingException , MaxReadSizeExceededException; 143 144 145 146 157 public String readStringByDelimiter(String delimiter, String encoding, int maxLength) throws IOException , UnsupportedEncodingException , MaxReadSizeExceededException; 158 159 160 161 173 public byte[] readBytesByDelimiter(String delimiter, int maxLength) throws IOException , MaxReadSizeExceededException; 174 } 175 | Popular Tags |