@Override public void close() throws IOException { in.close(); } }
@Override public void close() throws IOException { in.close(); } }
@Override public void close() { try { dataInputStream.close(); } catch (IOException e) { throw new RuntimeIOException(e); } }
@Override public void close() { try { dataInputStream.close(); } catch (IOException e) { throw new RuntimeIOException(e); } }
data.close();
input.close(); return outputGrid;
data.close();
input.close(); return outputGrid;
break; default: dis.close(); throw new IllegalArgumentException( "Precision MUST be specified and be either 32-bit or 64-bit, " dis.close(); throw new IllegalArgumentException( "Precision can only be 32/64 bits, other values are not valid."); "Couldn't obtain values. Please make sure the scan/chromatogram passes the Predicate."); } finally { dis.close();
break; default: dis.close(); throw new IllegalArgumentException( "Precision MUST be specified and be either 32-bit or 64-bit, " dis.close(); throw new IllegalArgumentException( "Precision can only be 32/64 bits, other values are not valid."); "Couldn't obtain values. Please make sure the scan/chromatogram passes the Predicate."); } finally { dis.close();
public static Grid read (InputStream inputStream) throws IOException { LittleEndianDataInputStream data = new LittleEndianDataInputStream(inputStream); int zoom = data.readInt(); int west = data.readInt(); int north = data.readInt(); int width = data.readInt(); int height = data.readInt(); Grid grid = new Grid(zoom, width, height, north, west); // loop in row-major order for (int y = 0, value = 0; y < height; y++) { for (int x = 0; x < width; x++) { grid.grid[x][y] = (value += data.readInt()); } } data.close(); return grid; }
public static Grid read (InputStream inputStream) throws IOException { LittleEndianDataInputStream data = new LittleEndianDataInputStream(inputStream); int zoom = data.readInt(); int west = data.readInt(); int north = data.readInt(); int width = data.readInt(); int height = data.readInt(); Grid grid = new Grid(zoom, width, height, north, west); // loop in row-major order for (int y = 0, value = 0; y < height; y++) { for (int x = 0; x < width; x++) { grid.grid[x][y] = (value += data.readInt()); } } data.close(); return grid; }