Contact: | ||
|---|---|---|
Tracker: | https://jira.codehaus.org/browse/GEOT-4191 | |
Tagline: |
|
|
Reading the Java 7 planned try-with-resource syntax I am convinced that supporting the Closable interface is necessary change for GeoTools 9.x.
Reading:
This proposal is shaping up, ask question on the email list or vote below:
| no progress |
| done |
| impeded |
| lack mandate/funds/time |
| volunteer needed |
|---|
BEFORE:
public interface FeatureIterator<F extends Feature> {
public boolean hasNext();
public F next() throws java.util.NoSuchElementException;
public void close();
}
|
AFTER:
import java.lang.Closable;
public interface FeatureIterator<F extends Feature> extends Closable {
public boolean hasNext();
public F next() throws java.util.NoSuchElementException;
public void close() throws IOException;
}
|
BEFORE:
public interface FeatureReader<T extends FeatureType, F extends Feature> {
T getFeatureType();
F next() throws IOException, IllegalArgumentException, NoSuchElementException;
boolean hasNext() throws IOException;
void close() throws IOException;
}
|
AFTER:
import java.lang.Closable;
public interface FeatureReader<T extends FeatureType, F extends Feature> extends Closable {
T getFeatureType();
F next() throws IOException, IllegalArgumentException, NoSuchElementException;
boolean hasNext() throws IOException;
void close() throws IOException;
} |
BEFORE:
public interface FeatureWriter<T extends FeatureType, F extends Feature> {
T getFeatureType();
F next() throws IOException;
void remove() throws IOException;
void write() throws IOException;
boolean hasNext() throws IOException;
void close() throws IOException;
}
|
AFTER:
import java.lang.Closable;
public interface FeatureWriter<T extends FeatureType, F extends Feature> extends Closable {
T getFeatureType();
F next() throws IOException;
void remove() throws IOException;
void write() throws IOException;
boolean hasNext() throws IOException;
void close() throws IOException;
} |