@Test public void writeUsesFileItemWrite() throws Exception { FileItem item = newMock(FileItem.class); File out = new File(""); UploadedFileItem uploadedFile = new UploadedFileItem(item); item.write(out); replay(); uploadedFile.write(out); verify(); }
@Override public void write(File file) { try { item.write(file); } catch (Exception e) { throw new RuntimeException(UploadMessages.writeFailure(file), e); } }
UploadedFileItem implements UploadedFile { @Override public void write(File file) { try { item.write(file); } catch (Exception e) { throw new RuntimeException(UploadMessages.writeFailure(file), e); } } }
UploadedFileItem implements UploadedFile { @Override public void write(File file) { try { item.write(file); } catch (Exception e) { throw new RuntimeException(UploadMessages.writeFailure(file), e); } } UploadedFileItem(FileItem item); }
UploadedFileItem implements UploadedFile { @Override public void write(File file) { try { item.write(file); } catch (Exception e) { throw new RuntimeException(UploadMessages.writeFailure(file), e); } } UploadedFileItem(FileItem item); @Override String getContentType(); @Override String getFileName(); @Override String getFilePath(); @Override long getSize(); @Override InputStream getStream(); @Override boolean isInMemory(); @Override void write(File file); void cleanup(); }
UploadedFileItem implements UploadedFile { @Override public void write(File file) { try { item.write(file); } catch (Exception e) { throw new RuntimeException(UploadMessages.writeFailure(file), e); } } UploadedFileItem(FileItem item); @Override String getContentType(); @Override String getFileName(); @Override String getFilePath(); @Override long getSize(); @Override InputStream getStream(); @Override boolean isInMemory(); @Override void write(File file); void cleanup();  }