@Test public void testAdd() throws TranslatorException { addFile("folder1/hello"); VirtualFile[] virtualFiles = CONNECTION.getFiles("folder1/hello"); assertEquals("The test fails", "hello", virtualFiles[0].getName()); }
@Override public void add(InputStream inputStream, String s) throws TranslatorException { try { OutputStream out = fileSystem.create(new Path(s)); IOUtils.copyBytes(inputStream, out, 131072); } catch (IOException e) { throw new TranslatorException(e); } }
HdfsConnection implements VirtualFileConnection { @Override public void add(InputStream inputStream, String s) throws TranslatorException { try { OutputStream out = fileSystem.create(new Path(s)); IOUtils.copyBytes(inputStream, out, 131072); } catch (IOException e) { throw new TranslatorException(e); } } }
HdfsConnection implements VirtualFileConnection { @Override public void add(InputStream inputStream, String s) throws TranslatorException { try { OutputStream out = fileSystem.create(new Path(s)); IOUtils.copyBytes(inputStream, out, 131072); } catch (IOException e) { throw new TranslatorException(e); } } HdfsConnection(HdfsConnectionFactory connectionFactory);  HdfsConnection(FileSystem fileSystem); }
HdfsConnection implements VirtualFileConnection { @Override public void add(InputStream inputStream, String s) throws TranslatorException { try { OutputStream out = fileSystem.create(new Path(s)); IOUtils.copyBytes(inputStream, out, 131072); } catch (IOException e) { throw new TranslatorException(e); } } HdfsConnection(HdfsConnectionFactory connectionFactory);  HdfsConnection(FileSystem fileSystem); @Override VirtualFile[] getFiles(String location); @Override void add(InputStream inputStream, String s); @Override boolean remove(String s); @Override void close(); }
HdfsConnection implements VirtualFileConnection { @Override public void add(InputStream inputStream, String s) throws TranslatorException { try { OutputStream out = fileSystem.create(new Path(s)); IOUtils.copyBytes(inputStream, out, 131072); } catch (IOException e) { throw new TranslatorException(e); } } HdfsConnection(HdfsConnectionFactory connectionFactory);  HdfsConnection(FileSystem fileSystem); @Override VirtualFile[] getFiles(String location); @Override void add(InputStream inputStream, String s); @Override boolean remove(String s); @Override void close();  }