@Test public void test_toStream_returns_value() throws IOException { InputStream inputStream = new FileInputStream(new File(TEST_DIRECTORY + "/" + FILE_NAME)); ArchiveFile archiveFile = new InputStreamArchiveFile("mime", FILE_NAME, inputStream); assertThat(archiveFile.getFileName(), is(equalTo(FILE_NAME))); assertThat(archiveFile.toStream(), is(instanceOf(InputStream.class))); }
public InputStream toStream() throws IOException { return new ByteArrayInputStream(streamData.clone()); }
InputStreamArchiveFile extends ArchiveFile { public InputStream toStream() throws IOException { return new ByteArrayInputStream(streamData.clone()); } }
InputStreamArchiveFile extends ArchiveFile { public InputStream toStream() throws IOException { return new ByteArrayInputStream(streamData.clone()); } InputStreamArchiveFile(String mimeType, String location, InputStream stream); }
InputStreamArchiveFile extends ArchiveFile { public InputStream toStream() throws IOException { return new ByteArrayInputStream(streamData.clone()); } InputStreamArchiveFile(String mimeType, String location, InputStream stream); InputStream toStream(); File copyStreamToDirectory(String directory); }
InputStreamArchiveFile extends ArchiveFile { public InputStream toStream() throws IOException { return new ByteArrayInputStream(streamData.clone()); } InputStreamArchiveFile(String mimeType, String location, InputStream stream); InputStream toStream(); File copyStreamToDirectory(String directory);  }