Polish
This commit is contained in:
@@ -39,7 +39,9 @@ public interface Sheet extends Iterable<String[]>, AutoCloseable {
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Get the row as a {@code String[]}. Returns {@code null} if the row doesn't exist.
|
||||
* Get the row as a {@code String[]}. Returns {@code null} if the row doesn't exist. Can throw an {@code UnsupportedOperationException}
|
||||
* when the underlying implementation doesn't support indexed access to rows.
|
||||
*
|
||||
* @param rowNumber the row number to read.
|
||||
* @return a {@code String[]} or {@code null}
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,13 @@ import org.springframework.batch.extensions.excel.Sheet;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.StaxUtils;
|
||||
|
||||
class StreamingSheet implements Sheet, Iterable<String[]>, Closeable {
|
||||
/**
|
||||
* {@code Sheet} implementation for Apache POI using the streaming event mode to read the rows.
|
||||
*
|
||||
* @author Marten Deinum
|
||||
* @since 0.1.0
|
||||
*/
|
||||
class StreamingSheet implements Sheet {
|
||||
|
||||
private final Log logger = LogFactory.getLog(StreamingSheet.class);
|
||||
|
||||
@@ -143,7 +149,7 @@ class StreamingSheet implements Sheet, Iterable<String[]>, Closeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
public void close() throws Exception {
|
||||
try {
|
||||
this.reader.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user