Added Checkstyle to build process and fixing checkstyle to all com.src.jpexs classes

This commit is contained in:
Jindra Petřík
2023-10-09 08:57:05 +02:00
parent b6e8ca0d67
commit dc5e50813f
789 changed files with 23773 additions and 22843 deletions

View File

@@ -106,7 +106,7 @@ public class SWFOutputStream extends OutputStream {
private int bitPos = 0;
private int tempByte = 0;
private String charset;
public long getPos() {
@@ -206,7 +206,7 @@ public class SWFOutputStream extends OutputStream {
byte[] data = value.getBytes(charset);
writeUI8(data.length);
write(data);
}
}
/**
* Writes UI32 (Unsigned 32bit integer) value to the stream
@@ -501,31 +501,7 @@ public class SWFOutputStream extends OutputStream {
for (Tag tag : tags) {
tag.writeTag(this);
}
}
/**
* Calculates number of bits needed for representing unsigned value
*
* @param value Unsigned value
* @return Number of bits
*/
public static int getNeededBitsU(int value) {
if (value == 0) {
return 0;
}
value = Math.abs(value);
long x = 1;
int nBits;
for (nBits = 1; nBits <= 64; nBits++) {
x <<= 1;
if (x > value) {
break;
}
}
return nBits;
}
}
/**
* Calculates number of bits needed for representing signed value
@@ -559,6 +535,30 @@ public class SWFOutputStream extends OutputStream {
}
return nBits;
}
/**
* Calculates number of bits needed for representing unsigned value
*
* @param value Unsigned value
* @return Number of bits
*/
public static int getNeededBitsU(int value) {
if (value == 0) {
return 0;
}
value = Math.abs(value);
long x = 1;
int nBits;
for (nBits = 1; nBits <= 64; nBits++) {
x <<= 1;
if (x > value) {
break;
}
}
return nBits;
}
public static int getNeededBitsU(int first, int... params) {
int nBits = 0;
@@ -1654,9 +1654,9 @@ public class SWFOutputStream extends OutputStream {
}
/**
* Writes MORPHFOCALGRADIENT value to the stream
* Writes MORPHFOCALGRADIENT value to the stream.
*
* Undocumented feature
* <p>Undocumented feature
*
* @param value MORPHGRADIENT value
* @param shapeNum 1 in DefineMorphShape, 2 in DefineMorphShape2,...