DXFile extends DXDataObject { public static Builder newFile() { return new Builder(); } private  DXFile(String fileId, DXContainer project, DXEnvironment env, JsonNode describe); private  DXFile(String fileId, DXEnvironment env); static DXFile getInstance(String fileId); static DXFile getInstance(String fileId, DXContainer project); static DXFile getInstanceWithEnvironment(String fileId, DXContainer project, DXEnvironment env); static DXFile getInstanceWithEnvironment(String fileId, DXEnvironment env); static Builder newFile(); static Builder newFileWithEnvironment(DXEnvironment env); @Override DXFile close(); @Override DXFile closeAndWait(); @Override Describe describe(); @Override Describe describe(DXDataObject.DescribeOptions options); byte[] downloadBytes(); byte[] downloadBytes(long start, long end); void downloadToOutputStream(OutputStream os); void downloadToOutputStream(OutputStream os, long start, long end); @Override Describe getCachedDescribe(); InputStream getDownloadStream(); InputStream getDownloadStream(long start, long end); OutputStream getUploadStream(); void upload(byte[] data); void upload(InputStream data);  }
@Test public void testDataObjectMethods() { DXDataObjectTest.BuilderFactory<DXFile.Builder, DXFile> builderFactory = new DXDataObjectTest.BuilderFactory<DXFile.Builder, DXFile>() { @Override public DXFile.Builder getBuilder() { return DXFile.newFile(); } }; DXDataObjectTest.testOpenDataObjectMethods(testProject, builderFactory); }