Skip to content

Commit 0fd0964

Browse files
BezrukovMiText-CI
authored andcommitted
Fix javadoc for TIFFDirectory and TIFFField
DEVSIX-4193 Autoported commit. Original commit hash: [d34dbbb01]
1 parent 0763ef4 commit 0fd0964

File tree

3 files changed

+42
-14
lines changed

3 files changed

+42
-14
lines changed

itext/itext.io/itext/io/codec/TIFFDirectory.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -684,17 +684,20 @@ public static int GetNumDirectories(RandomAccessFileOrArray stream) {
684684

685685
/// <summary>
686686
/// Returns a boolean indicating whether the byte order used in the
687-
/// the TIFF file is big-endian (i.e. whether the byte order is from
687+
/// TIFF file is big-endian (i.e. whether the byte order is from
688688
/// the most significant to the least significant)
689689
/// </summary>
690+
/// <returns>
691+
///
692+
/// <see langword="true"/>
693+
/// if the byte order used in the TIFF file is big-endian
694+
/// </returns>
690695
public virtual bool IsBigEndian() {
691696
return isBigEndian;
692697
}
693698

694-
/// <summary>
695-
/// Returns the offset of the IFD corresponding to this
696-
/// <c>TIFFDirectory</c>.
697-
/// </summary>
699+
/// <summary>Returns the offset of the IFD corresponding to this <c>TIFFDirectory</c>.</summary>
700+
/// <returns>the offset of the IFD corresponding to this <c>TIFFDirectory</c>.</returns>
698701
public virtual long GetIFDOffset() {
699702
return IFDOffset;
700703
}
@@ -703,6 +706,10 @@ public virtual long GetIFDOffset() {
703706
/// Returns the offset of the next IFD after the IFD corresponding to this
704707
/// <c>TIFFDirectory</c>.
705708
/// </summary>
709+
/// <returns>
710+
/// the offset of the next IFD after the IFD corresponding to this
711+
/// <c>TIFFDirectory</c>.
712+
/// </returns>
706713
public virtual long GetNextIFDOffset() {
707714
return nextIFDOffset;
708715
}

itext/itext.io/itext/io/codec/TIFFField.cs

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ internal TIFFField() {
161161
/// </tr>
162162
/// </table>
163163
/// </remarks>
164-
/// <param name="tag">The tag</param>
165-
/// <param name="type"/>
166-
/// <param name="count"/>
167-
/// <param name="data"/>
164+
/// <param name="tag">the tag number</param>
165+
/// <param name="type">the tag type</param>
166+
/// <param name="count">the number of data items present in the field</param>
167+
/// <param name="data">the field data</param>
168168
public TIFFField(int tag, int type, int count, Object data) {
169169
this.tag = tag;
170170
this.type = type;
@@ -237,6 +237,7 @@ public virtual char[] GetAsChars() {
237237
/// <para /> A ClassCastException will be thrown if the field is not
238238
/// of type TIFF_SSHORT.
239239
/// </remarks>
240+
/// <returns>TIFF_SSHORT data as an array of shorts (signed 16-bit integers).</returns>
240241
public virtual short[] GetAsShorts() {
241242
return (short[])data;
242243
}
@@ -251,6 +252,7 @@ public virtual short[] GetAsShorts() {
251252
/// <para /> A ClassCastException will be thrown if the field is not
252253
/// of type TIFF_SLONG.
253254
/// </remarks>
255+
/// <returns>TIFF_SLONG data as an array of ints (signed 32-bit integers).</returns>
254256
public virtual int[] GetAsInts() {
255257
return (int[])data;
256258
}
@@ -265,6 +267,7 @@ public virtual int[] GetAsInts() {
265267
/// <para /> A ClassCastException will be thrown if the field is not
266268
/// of type TIFF_LONG.
267269
/// </remarks>
270+
/// <returns>TIFF_LONG data as an array of longs (signed 64-bit integers).</returns>
268271
public virtual long[] GetAsLongs() {
269272
return (long[])data;
270273
}
@@ -275,6 +278,7 @@ public virtual long[] GetAsLongs() {
275278
/// <para /> A ClassCastException will be thrown if the field is not
276279
/// of type TIFF_FLOAT.
277280
/// </remarks>
281+
/// <returns>TIFF_FLOAT data as an array of floats.</returns>
278282
public virtual float[] GetAsFloats() {
279283
return (float[])data;
280284
}
@@ -285,6 +289,7 @@ public virtual float[] GetAsFloats() {
285289
/// <para /> A ClassCastException will be thrown if the field is not
286290
/// of type TIFF_DOUBLE.
287291
/// </remarks>
292+
/// <returns>TIFF_DOUBLE data as an array of doubles.</returns>
288293
public virtual double[] GetAsDoubles() {
289294
return (double[])data;
290295
}
@@ -295,6 +300,7 @@ public virtual double[] GetAsDoubles() {
295300
/// <para /> A ClassCastException will be thrown if the field is not
296301
/// of type TIFF_ASCII.
297302
/// </remarks>
303+
/// <returns>TIFF_ASCII data as an array of strings.</returns>
298304
public virtual String[] GetAsStrings() {
299305
return (String[])data;
300306
}
@@ -305,6 +311,7 @@ public virtual String[] GetAsStrings() {
305311
/// <para /> A ClassCastException will be thrown if the field is not
306312
/// of type TIFF_SRATIONAL.
307313
/// </remarks>
314+
/// <returns>TIFF_SRATIONAL data as an array of 2-element arrays of ints.</returns>
308315
public virtual int[][] GetAsSRationals() {
309316
return (int[][])data;
310317
}
@@ -315,6 +322,7 @@ public virtual int[][] GetAsSRationals() {
315322
/// <para /> A ClassCastException will be thrown if the field is not
316323
/// of type TIFF_RATTIONAL.
317324
/// </remarks>
325+
/// <returns>TIFF_RATIONAL data as an array of 2-element arrays of longs.</returns>
318326
public virtual long[][] GetAsRationals() {
319327
return (long[][])data;
320328
}
@@ -335,6 +343,10 @@ public virtual long[][] GetAsRationals() {
335343
/// TIFF_SSHORT, or TIFF_SLONG.
336344
/// </remarks>
337345
/// <param name="index">The index</param>
346+
/// <returns>
347+
/// data in TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT,
348+
/// or TIFF_SLONG format as an int.
349+
/// </returns>
338350
public virtual int GetAsInt(int index) {
339351
switch (type) {
340352
case TIFF_BYTE:
@@ -380,6 +392,10 @@ public virtual int GetAsInt(int index) {
380392
/// TIFF_SSHORT, TIFF_SLONG, or TIFF_LONG.
381393
/// </remarks>
382394
/// <param name="index">The index</param>
395+
/// <returns>
396+
/// data in TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT, TIFF_SLONG,
397+
/// or TIFF_LONG format as a long.
398+
/// </returns>
383399
public virtual long GetAsLong(int index) {
384400
switch (type) {
385401
case TIFF_BYTE:
@@ -415,16 +431,17 @@ public virtual long GetAsLong(int index) {
415431

416432
/// <summary>Returns data in any numerical format as a float.</summary>
417433
/// <remarks>
418-
/// Returns data in any numerical format as a float. Data in
434+
/// Returns data in any numerical format as a float. Data in
419435
/// TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by
420436
/// dividing the numerator into the denominator using
421437
/// double-precision arithmetic and then truncating to single
422-
/// precision. Data in TIFF_SLONG, TIFF_LONG, or TIFF_DOUBLE
438+
/// precision. Data in TIFF_SLONG, TIFF_LONG, or TIFF_DOUBLE
423439
/// format may suffer from truncation.
424440
/// <para /> A ClassCastException will be thrown if the field is
425441
/// of type TIFF_UNDEFINED or TIFF_ASCII.
426442
/// </remarks>
427443
/// <param name="index">The index</param>
444+
/// <returns>data in any numerical format as a float.</returns>
428445
public virtual float GetAsFloat(int index) {
429446
switch (type) {
430447
case TIFF_BYTE: {
@@ -475,16 +492,17 @@ public virtual float GetAsFloat(int index) {
475492
}
476493
}
477494

478-
/// <summary>Returns data in any numerical format as a float.</summary>
495+
/// <summary>Returns data in any numerical format as a double.</summary>
479496
/// <remarks>
480-
/// Returns data in any numerical format as a float. Data in
497+
/// Returns data in any numerical format as a double. Data in
481498
/// TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by
482499
/// dividing the numerator into the denominator using
483500
/// double-precision arithmetic.
484501
/// <para /> A ClassCastException will be thrown if the field is of
485502
/// type TIFF_UNDEFINED or TIFF_ASCII.
486503
/// </remarks>
487504
/// <param name="index">The index</param>
505+
/// <returns>data in any numerical format as a double.</returns>
488506
public virtual double GetAsDouble(int index) {
489507
switch (type) {
490508
case TIFF_BYTE: {
@@ -542,6 +560,7 @@ public virtual double GetAsDouble(int index) {
542560
/// of type TIFF_ASCII.
543561
/// </remarks>
544562
/// <param name="index">The index</param>
563+
/// <returns>a TIFF_ASCII data item as a String.</returns>
545564
public virtual String GetAsString(int index) {
546565
return ((String[])data)[index];
547566
}
@@ -557,6 +576,7 @@ public virtual String GetAsString(int index) {
557576
/// of type TIFF_SRATIONAL.
558577
/// </remarks>
559578
/// <param name="index">The index</param>
579+
/// <returns>a TIFF_SRATIONAL data item as a two-element array of ints.</returns>
560580
public virtual int[] GetAsSRational(int index) {
561581
return ((int[][])data)[index];
562582
}
@@ -572,6 +592,7 @@ public virtual int[] GetAsSRational(int index) {
572592
/// of type TIFF_RATIONAL.
573593
/// </remarks>
574594
/// <param name="index">The index</param>
595+
/// <returns>a TIFF_RATIONAL data item as a two-element array of ints</returns>
575596
public virtual long[] GetAsRational(int index) {
576597
if (type == TIFF_LONG) {
577598
return GetAsLongs();

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5122a85b0f187436d65f354d97b1d080e8975e20
1+
d34dbbb016d778e89e04f0e5e35554b6d193f989

0 commit comments

Comments
 (0)