mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 19:04:38 +00:00
Added Checkstyle to build process and fixing checkstyle to all com.src.jpexs classes
This commit is contained in:
@@ -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,...
|
||||
|
||||
Reference in New Issue
Block a user