private void GetEdges() throws IOException { outputStream.writeInt(EdgeFactory.getEdgeCount(level)); EdgeFactory.calculate( level, (o, edge) -> { try { applyZoom((Edge) edge).write(outputStream); } catch (IOException e) { e.printStackTrace(); } }); }
private void GetAllEdges() throws IOException { List<Edge> edges = EdgeFactory.getAll(level); outputStream.writeInt(edges.size()); for (Edge edge : edges) applyZoom(edge).write(outputStream); }