Package com.draftable.api.client
Class Comparisons.Side
java.lang.Object
com.draftable.api.client.Comparisons.Side
- Enclosing class:
Comparisons
Represents a file passed in as one side of a comparison.
Comparisons.Side
instances provided to Comparisons.createComparison(com.draftable.api.client.Comparisons.Side, com.draftable.api.client.Comparisons.Side) to provide the left and right
files.-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparisons.SideCreates aComparisons.Sidefor a file provided by as a byte array.static Comparisons.SideCreates aComparisons.Sidefor a file provided by as a byte array.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a givenFileinstance, with an inferred file type and no display name.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a givenFileinstance.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a givenFileinstance.static Comparisons.Sidecreate(InputStream fileStream, String fileType) Creates aComparisons.Sidefor a file provided by as anInputStream.static Comparisons.Sidecreate(InputStream fileStream, String fileType, String displayName) Creates aComparisons.Sidefor a file provided by as anInputStream.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a URL.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a URL.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a URI.static Comparisons.SideCreates aComparisons.Sidefor a file provided by a URI.
-
Method Details
-
create
@Nonnull public static Comparisons.Side create(@Nonnull String sourceURL, @Nonnull String fileType, @Nullable String displayName) Creates aComparisons.Sidefor a file provided by a URL.- Parameters:
sourceURL- The URL at which the file can be accessed by the Draftable servers.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).displayName- An optional name for the file, to be displayed in the comparison.- Returns:
- A
Comparisons.Sideinstance representing the given source URL and file information.
-
create
Creates aComparisons.Sidefor a file provided by a URL.- Parameters:
sourceURL- The URL at which the file can be accessed by the Draftable servers.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).- Returns:
- A
Comparisons.Sideinstance representing the given source URL and file information.
-
create
@Nonnull public static Comparisons.Side create(@Nonnull URI sourceURI, @Nonnull String fileType, @Nullable String displayName) Creates aComparisons.Sidefor a file provided by a URI.- Parameters:
sourceURI- TheURIat which the file can be accessed by the Draftable servers.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).displayName- An optional name for the file, to be displayed in the comparison.- Returns:
- A
Comparisons.Sideinstance representing the given source URI and file information.
-
create
Creates aComparisons.Sidefor a file provided by a URI.- Parameters:
sourceURI- TheURIat which the file can be accessed by the Draftable servers.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).- Returns:
- A
Comparisons.Sideinstance representing the given source URI and file information.
-
create
@Nonnull public static Comparisons.Side create(@Nonnull File file, @Nonnull String fileType, @Nullable String displayName) Creates aComparisons.Sidefor a file provided by a givenFileinstance.- Parameters:
file- TheFileobject providing the content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).displayName- An optional name for the file, to be displayed in the comparison.- Returns:
- A
Comparisons.Sideinstance representing the givenFileand file information.
-
create
Creates aComparisons.Sidefor a file provided by a givenFileinstance.- Parameters:
file- TheFileobject providing the content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).- Returns:
- A
Comparisons.Sideinstance representing the givenFileand file information.
-
create
Creates aComparisons.Sidefor a file provided by a givenFileinstance, with an inferred file type and no display name.- Parameters:
file- TheFileobject providing the content.- Returns:
- A
Comparisons.Sideinstance representing the givenFile, with an inferred file type and no display name.
-
create
@Nonnull public static Comparisons.Side create(@Nonnull byte[] fileBytes, @Nonnull String fileType, @Nullable String displayName) Creates aComparisons.Sidefor a file provided by as a byte array.- Parameters:
fileBytes- The byte array providing the file's content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).displayName- An optional name for the file, to be displayed in the comparison.- Returns:
- A
Comparisons.Sideinstance representing the a file with the given content and information.
-
create
Creates aComparisons.Sidefor a file provided by as a byte array.- Parameters:
fileBytes- The byte array providing the file's content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).- Returns:
- A
Comparisons.Sideinstance representing the a file with the given content and information.
-
create
@Nonnull public static Comparisons.Side create(@Nonnull InputStream fileStream, @Nonnull String fileType, @Nullable String displayName) Creates aComparisons.Sidefor a file provided by as anInputStream.- Parameters:
fileStream- TheInputStreamproviding the file's content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).displayName- An optional name for the file, to be displayed in the comparison.- Returns:
- A
Comparisons.Sideinstance representing the a file with the given content and information.
-
create
@Nonnull public static Comparisons.Side create(@Nonnull InputStream fileStream, @Nonnull String fileType) Creates aComparisons.Sidefor a file provided by as anInputStream.- Parameters:
fileStream- TheInputStreamproviding the file's content.fileType- The file's extension. This must be one of the API's supported file extensions (PDF, Word, PowerPoint).- Returns:
- A
Comparisons.Sideinstance representing the a file with the given content and information.
-