Exemplo n.º 1
0
  public synchronized ReadData getRead() throws IOException {
    ReadData nextRead;
    try {
      nextRead = new ReadData(reader);
    } catch (OutOfMemoryError e) {
      return null;
    }

    if (nextRead.getHeader() != null) {
      return nextRead;
    }

    return null;
  }
Exemplo n.º 2
0
 public synchronized void writeRead(ReadData readData) throws IOException {
   readData.write(writer);
 }