git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code cleanup + BufInputStream.is()
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
utils
/
serial
/
Importer.java
diff --git
a/src/be/nikiroo/utils/serial/Importer.java
b/src/be/nikiroo/utils/serial/Importer.java
index 80a8684bd92f97433faf9d6ece457e0b41fa29be..5b75d313bc465918feb18786f90badb163ece6be 100644
(file)
--- a/
src/be/nikiroo/utils/serial/Importer.java
+++ b/
src/be/nikiroo/utils/serial/Importer.java
@@
-9,6
+9,7
@@
import java.util.zip.GZIPInputStream;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.streams.Base64InputStream;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.streams.Base64InputStream;
+import be.nikiroo.utils.streams.BufferedInputStream;
import be.nikiroo.utils.streams.NextableInputStream;
import be.nikiroo.utils.streams.NextableInputStreamStep;
import be.nikiroo.utils.streams.NextableInputStream;
import be.nikiroo.utils.streams.NextableInputStreamStep;
@@
-136,7
+137,7
@@
public class Importer {
* @throws IOException
* if the content cannot be read (for instance, corrupt data)
*/
* @throws IOException
* if the content cannot be read (for instance, corrupt data)
*/
- private boolean processLine(InputStream in) throws NoSuchFieldException,
+ private boolean processLine(
Buffered
InputStream in) throws NoSuchFieldException,
NoSuchMethodException, ClassNotFoundException, IOException {
// Defer to latest child if any
NoSuchMethodException, ClassNotFoundException, IOException {
// Defer to latest child if any
@@
-155,10
+156,6
@@
public class Importer {
// TODO use the stream, Luke
String line = IOUtils.readSmallStream(in);
// TODO use the stream, Luke
String line = IOUtils.readSmallStream(in);
- if (line.isEmpty()) {
- return false;
- }
-
if (line.equals("{")) { // START: new child if needed
if (link != null) {
child = new Importer(map);
if (line.equals("{")) { // START: new child if needed
if (link != null) {
child = new Importer(map);