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.Side
Creates aComparisons.Side
for a file provided by as a byte array.static Comparisons.Side
Creates aComparisons.Side
for a file provided by as a byte array.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a givenFile
instance, with an inferred file type and no display name.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a givenFile
instance.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a givenFile
instance.static Comparisons.Side
create
(InputStream fileStream, String fileType) Creates aComparisons.Side
for a file provided by as anInputStream
.static Comparisons.Side
create
(InputStream fileStream, String fileType, String displayName) Creates aComparisons.Side
for a file provided by as anInputStream
.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a URL.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a URL.static Comparisons.Side
Creates aComparisons.Side
for a file provided by a URI.static Comparisons.Side
Creates aComparisons.Side
for 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.Side
for 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.Side
instance representing the given source URL and file information.
-
create
Creates aComparisons.Side
for 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.Side
instance 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.Side
for a file provided by a URI.- Parameters:
sourceURI
- TheURI
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.Side
instance representing the given source URI and file information.
-
create
Creates aComparisons.Side
for a file provided by a URI.- Parameters:
sourceURI
- TheURI
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.Side
instance 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.Side
for a file provided by a givenFile
instance.- Parameters:
file
- TheFile
object 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.Side
instance representing the givenFile
and file information.
-
create
Creates aComparisons.Side
for a file provided by a givenFile
instance.- Parameters:
file
- TheFile
object 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.Side
instance representing the givenFile
and file information.
-
create
Creates aComparisons.Side
for a file provided by a givenFile
instance, with an inferred file type and no display name.- Parameters:
file
- TheFile
object providing the content.- Returns:
- A
Comparisons.Side
instance 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.Side
for 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.Side
instance representing the a file with the given content and information.
-
create
Creates aComparisons.Side
for 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.Side
instance 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.Side
for a file provided by as anInputStream
.- Parameters:
fileStream
- TheInputStream
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.Side
instance 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.Side
for a file provided by as anInputStream
.- Parameters:
fileStream
- TheInputStream
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.Side
instance representing the a file with the given content and information.
-