FileEntry extends VirtualFileEntry { public void updateContent(byte[] content, String mediaType) throws ForbiddenException, ServerException { updateContent(new ByteArrayInputStream(content), mediaType); } FileEntry(String workspace, VirtualFile virtualFile); @Override FileEntry copyTo(String newParent); @Override FileEntry copyTo(String newParent, String newName, boolean override); @Override void moveTo(String newParent); @Override void moveTo(String newParent, String name, boolean overWrite); String getMediaType(); void setMediaType(String mediaType); InputStream getInputStream(); byte[] contentAsBytes(); void updateContent(byte[] content, String mediaType); void updateContent(byte[] content); void updateContent(InputStream content); void updateContent(InputStream content, String mediaType); void rename(String newName, String newMediaType);  }
@Test public void testUpdateContent() throws Exception { String mediaType = myFile.getMediaType(); byte[] b = "test update content".getBytes(); myFile.updateContent(b); Assert.assertEquals(myFile.contentAsBytes(), b); Assert.assertEquals(myFile.getMediaType(), mediaType); }