Lines Matching defs:dataClass
1159 private static <T> T readInput(DataInputStream in, Class<T> dataClass) throws IOException {
1161 if (dataClass == Integer.class) {
1163 } else if (dataClass == Short.class) {
1165 } else if (dataClass == Byte.class) {
1167 } else if (dataClass == String.class) {
1169 } else if (Chunk.class.isAssignableFrom(dataClass)) {
1171 try { obj = dataClass.newInstance(); }
1176 throw new InternalError("bad input datum: "+dataClass);
1178 return dataClass.cast(data);
1180 private static <T> T readInput(byte[] bytes, Class<T> dataClass) {
1182 return readInput(new DataInputStream(new ByteArrayInputStream(bytes)), dataClass);