UCFPackage extends ODFJaxb implements Cloneable { public void save(File packageFile) throws IOException { File tempFile = createTempFile("." + packageFile.getName(), ".tmp", packageFile.getCanonicalFile().getParentFile()); prepareAndSave(tempFile); boolean renamed = tempFile.renameTo(packageFile); if (!renamed && packageFile.exists() && tempFile.exists()) { if (!packageFile.delete()) throw new IOException("Could not delete existing " + packageFile); renamed = tempFile.renameTo(packageFile); } if (!renamed) throw new IOException("Could not rename temp file " + tempFile + " to " + packageFile); } UCFPackage();  UCFPackage(File containerFile);  UCFPackage(InputStream inputStream); String getPackageMediaType(); void setPackageMediaType(String mediaType); void save(File packageFile); void addResource(String stringValue, String path, String mediaType); void addResource(byte[] bytesValue, String path, String mediaType); void addResource(Document document, String path, String mediaType); void addResource(InputStream inputStream, String path,
			String mediaType); void addResource(URI uri, String path, String mediaType); String getResourceAsString(String path); byte[] getResourceAsBytes(String path); InputStream getResourceAsInputStream(String path); Map<String, ResourceEntry> listResources(); Map<String, ResourceEntry> listResources(String folderPath); void removeResource(String path); Map<String, ResourceEntry> listAllResources(); void setRootFile(String path); @SuppressWarnings("rawtypes") void setRootFile(String path, String version); @SuppressWarnings("rawtypes") List<ResourceEntry> getRootFiles(); ResourceEntry getResourceEntry(String path); @SuppressWarnings("rawtypes") void unsetRootFile(String path); void save(OutputStream output); OutputStream addResourceUsingOutputStream(String path,
			String mediaType); @Override UCFPackage clone(); String getRootFileVersion(String rootFile); static final String MIME_BINARY; static final String MIME_TEXT_PLAIN; static final String MIME_TEXT_XML; static final String MIME_RDF; static final String MIME_EPUB; static final String MIME_WORKFLOW_BUNDLE; static final String MIME_DATA_BUNDLE; static final String MIME_WORKFLOW_RUN_BUNDLE; static final String MIME_SERVICE_BUNDLE; }
@Test(expected = IllegalStateException.class) public void noDefaultMimeType() throws Exception { UCFPackage container = new UCFPackage(); container.save(tmpFile); }