MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / readFile

Method readFile

src/main/java/io/file/transfer/TransferTask.java:234–250  ·  view source on GitHub ↗
(byte b[])

Source from the content-addressed store, hash-verified

232 }
233
234 int readFile(byte b[]) {
235 try {
236 int len = is.read(b);
237 if (len < 0) {
238 len = 0;
239 }
240 filePos += len;
241 state = PROGRESS;
242 return len;
243 } catch (IOException ex) {
244 state = ERROR;
245 errMsg = "Read error";
246 showEvent = true;
247 //todo: terminate transfer
248 return 0;
249 }
250 }
251
252 boolean isAcceptWaiting() {
253 return state == IN_ASK;

Callers 1

runMethod · 0.95

Calls 1

readMethod · 0.45

Tested by

no test coverage detected