670671672673674675676
} catch (IOException e) { log.warn("Failed to read from tar file " + reader, e); } } throw new SegmentNotFoundException(id); }
91929394959697
public Segment readSegment(SegmentId id) { Segment segment = segments.get(id); if (segment != null) { return segment; } throw new SegmentNotFoundException(id); }
122123124125126127128129130131
return new Segment(tracker, id, ByteBuffer.wrap(data)); } finally { stream.close(); } } catch (MalformedURLException e) { throw new SegmentNotFoundException(id, e); } catch (IOException e) { throw new RuntimeException(e); } }