protected void initReader(Resource nextFile) { try { reader = new BufferedReader(new InputStreamReader(nextFile.getInputStream(), UTF_8)); } catch (Exception e) { throw new UnsupportedOperationException(e); } }
protected void initReader(Resource nextFile) { try { reader = new BufferedReader(new InputStreamReader(nextFile.getInputStream(), UTF_8)); } catch (Exception e) { throw new UnsupportedOperationException(e); } }
private BufferedReader getReader() throws FileNotFoundException, IOException { BufferedReader r = null; if (!fileQueue.isEmpty()) { currentResource = fileQueue.poll(); InputStream resolvedStream = CompressionUtils.getInputStream(currentResource.getPath(), currentResource.getInputStream()); r = new BufferedReader(new InputStreamReader(resolvedStream, encoding)); } return r; } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( CompressionUtils.getInputStream(res.getLocation(), res.getInputStream()), sourceEncoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = new BufferedInputStream(res.getInputStream()); WLData wLData = WLDObjector.read(is); TextCorpus aCorpusData = wLData.getTextCorpus(); convertToCas(aJCas, aCorpusData); } catch (WLFormatException e) { throw new CollectionException(e); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader(res.getInputStream(), encoding)); convert(aJCas, reader); } finally { closeQuietly(reader); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); InputStream is = null; try { is = res.getInputStream(); convertToCas(aJCas, is, encoding); } finally { closeQuietly(is); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); try (LineNumberReader br = new LineNumberReader( new InputStreamReader(res.getInputStream(), encoding))) { new Tsv3XDeserializer().read(br, aJCas); } } }
@Override public void getNext(JCas aJCas) throws IOException, CollectionException { Resource res = nextFile(); initCas(aJCas, res); try (LineNumberReader br = new LineNumberReader( new InputStreamReader(res.getInputStream(), encoding))) { new Tsv3XDeserializer().read(br, aJCas); } } }