private void setup(InputStream stream, int size, int format, boolean swapxy) throws Exception { // varify that filename and size are valid. if (null == stream || size <= 0) { throw new Exception("Must supply valid stream and " + "size (> 0)"); } this.stream = stream; this.size = size; this.format = format; this.swapxy = swapxy; load(); }
public RawHeightMap(InputStream stream, int size, int format, boolean swapxy) throws Exception { setup(stream, size, format, swapxy); }
public RawHeightMap(String filename, int size, int format, boolean swapxy) throws Exception { // varify that filename and size are valid. if (null == filename || size <= 0) { throw new Exception("Must supply valid filename and " + "size (> 0)"); } try { setup(new FileInputStream(filename), size, format, swapxy); } catch (FileNotFoundException e) { throw new Exception("height file not found: " + filename); } }
private void setup(InputStream stream, int size, int format, boolean swapxy) throws Exception { // varify that filename and size are valid. if (null == stream || size <= 0) { throw new Exception("Must supply valid stream and " + "size (> 0)"); } this.stream = stream; this.size = size; this.format = format; this.swapxy = swapxy; load(); }
public RawHeightMap(URL resource, int size, int format, boolean swapxy) throws Exception { // varify that resource and size are valid. if (null == resource || size <= 0) { throw new Exception("Must supply valid resource and " + "size (> 0)"); } try { setup(resource.openStream(), size, format, swapxy); } catch (IOException e) { throw new Exception("Unable to open height url: " + resource); } }
public RawHeightMap(InputStream stream, int size, int format, boolean swapxy) throws Exception { setup(stream, size, format, swapxy); }
public RawHeightMap(URL resource, int size, int format, boolean swapxy) throws Exception { // varify that resource and size are valid. if (null == resource || size <= 0) { throw new Exception("Must supply valid resource and " + "size (> 0)"); } try { setup(resource.openStream(), size, format, swapxy); } catch (IOException e) { throw new Exception("Unable to open height url: " + resource); } }
public RawHeightMap(String filename, int size, int format, boolean swapxy) throws Exception { // varify that filename and size are valid. if (null == filename || size <= 0) { throw new Exception("Must supply valid filename and " + "size (> 0)"); } try { setup(new FileInputStream(filename), size, format, swapxy); } catch (FileNotFoundException e) { throw new Exception("height file not found: " + filename); } }