Skip to content

Commit 1a8692b

Browse files
committed
Merge commit '591eb175b2e8049726635b73f69b38a75cdb274a' into develop
* commit '591eb175b2e8049726635b73f69b38a75cdb274a': bump version update settings add an iso sample add override annotations clean up use a jdk method instead of original follow ide advices use ByteUtil instead of EndianUtilities make test more effective rename a method
2 parents fb96d12 + 591eb17 commit 1a8692b

File tree

752 files changed

+5536
-4995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

752 files changed

+5536
-4995
lines changed

README.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@ https://jitpack.io/#umjammer/vavi-nio-file-discutils
2727

2828
## Status
2929

30-
| fs | list | upload | download | copy | move | rm | mkdir | cache | watch | create | comment |
31-
|----------|-----------|--------|-----------|------|------|----|-------|-------|-------|--------|---------------------------------------------------------------------------------------------------------------------------------------|
32-
| UDF | | | | | | | | | | | |
33-
| FAT | ✅ (RAW) | | | | | | | | | | | |
34-
| NTFS | ✅ (VDI) | | ✅ (VDI) | | | | | | | | |
35-
| HSF+ | ✅ (DMG) | | | | | | | | | | 🚫 (ISO) same error on original |
36-
| EXT | 🚧 (VDI) | | | | | | | | | | |
37-
| XFS | | | | | | | | | | | |
38-
| ISO | 🚧 | | | | | | | | || |
39-
| VHD | ✅ (fat16) | | ✅ (fat16) | | | | | | | | ~~🐛 subdir w/ fuse~~ |
40-
| VDI | ✅ (fat16) | | ✅ (fat16) | | | | | | | | ~~🐛 copy bytes slip out of place? w/ fuse~~ |
41-
| XVA | | | | | | | | | | | |
42-
| VMDK | | | | | | | | | | | |
43-
| DMG || | | | | | | | | | |
44-
| Registry || | | | | | | | | | Windows 10's registry |
45-
| ├ BCD || | | | | | | | | | Windows XP's bcd |
46-
| iSCSI | 🚫 | | | | | | | | | | server [jscsi](https://github.com/sebastiangraf/jSCSI) |
47-
| NFS | 🚫 | | | | | | | | | | server [nfs4j](https://github.com/dcache/nfs4j) |
48-
| ODS | 🚫 | | | | | | | | | | server [vavi-net-ods](https://github.com/umjammer/vavi-net-ods) |
49-
| EMU | ✅ (nhd) | | | | | | | | | | [vavi-nio-file-emu](https://github.com/umjammer/vavi-nio-file-emu) [vavi-nio-file-fat](https://github.com/umjammer/vavi-nio-file-Fat) |
30+
| fs | list | upload | download | copy | move | rm | mkdir | cache | watch | create | comment |
31+
|----------|----------------|--------|-----------|------|------|----|-------|-------|-------|--------|---------------------------------------------------------------------------------------------------------------------------------------|
32+
| UDF | | | | | | | | - | | | |
33+
| FAT | ✅ (RAW) | | | | | | | - | | | | |
34+
| NTFS | ✅ (VDI) | | ✅ (VDI) | | | | | - | | | |
35+
| HSF+ | ✅ (DMG) | | | | | | | - | | | 🚫 (ISO) same error on original |
36+
| EXT | 🚧 (VDI) | | | | | | | - | | | |
37+
| XFS | | | | | | | | - | | | |
38+
| ISO | 🚧 | | | | | | | - | | | |
39+
| VHD | ✅ (fat16) | | ✅ (fat16) | | | | | - | | | ~~🐛 subdir w/ fuse~~ |
40+
| VDI | ✅ (ntfs,fat16) | | ✅ (ntfs,fat16) | | | | | - | | | ~~🐛 copy bytes slip out of place? w/ fuse~~ |
41+
| XVA | | | | | | | | - | | | |
42+
| VMDK | | | | | | | | - | | | |
43+
| DMG | | | | | | | | | | | |
44+
| Registry | | | | | | | | - | - | - | Windows 10's registry |
45+
| ├ BCD | | | | | | | | - | - | - | Windows XP's bcd |
46+
| iSCSI | 🚫 | | | | | | | | | | server [jscsi](https://github.com/sebastiangraf/jSCSI) |
47+
| NFS | 🚫 | | | | | | | | | - | server [nfs4j](https://github.com/dcache/nfs4j) |
48+
| ODS | 🚫 | | | | | | | | | - | server [vavi-net-ods](https://github.com/umjammer/vavi-net-ods) |
49+
| EMU | ✅ (nhd) | | | | | | | - | | - | [vavi-nio-file-emu](https://github.com/umjammer/vavi-nio-file-emu) [vavi-nio-file-fat](https://github.com/umjammer/vavi-nio-file-Fat) |
5050

5151
## Project Description
5252

pom.xml

+47-31
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>vavi</groupId>
55
<artifactId>vavi-nio-file-discutils</artifactId>
6-
<version>0.14.4</version>
6+
<version>0.14.5</version>
77

88
<properties>
99
<vavi-net-fuse.groupId>com.github.umjammer.vavi-apps-fuse</vavi-net-fuse.groupId> <!-- com.github.umjammer.vavi-apps-fuse -->
@@ -104,6 +104,43 @@
104104
</plugins>
105105
</build>
106106
</profile>
107+
108+
<profile>
109+
<id>qlgenerator</id>
110+
<activation>
111+
<property>
112+
<name>qlgenerator</name>
113+
<value/>
114+
</property>
115+
</activation>
116+
<build>
117+
<plugins>
118+
<plugin>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-antrun-plugin</artifactId>
121+
<version>3.1.0</version>
122+
<executions>
123+
<execution>
124+
<phase>compile</phase>
125+
<goals>
126+
<goal>run</goal>
127+
</goals>
128+
<configuration>
129+
<target>
130+
<jar jarfile="${project.build.directory}/vavi-qlgenerator.jar"
131+
manifest="src/qlgenerator/resources/manifest.mf">
132+
<fileset dir="${project.build.outputDirectory}">
133+
<include name="vavi/apps/qlgenerator/*.class" />
134+
</fileset>
135+
</jar>
136+
</target>
137+
</configuration>
138+
</execution>
139+
</executions>
140+
</plugin>
141+
</plugins>
142+
</build>
143+
</profile>
107144
</profiles>
108145

109146
<build>
@@ -126,29 +163,6 @@
126163
</testExcludes>
127164
</configuration>
128165
</plugin>
129-
<plugin>
130-
<groupId>org.apache.maven.plugins</groupId>
131-
<artifactId>maven-antrun-plugin</artifactId>
132-
<version>3.1.0</version>
133-
<executions>
134-
<execution>
135-
<phase>compile</phase>
136-
<goals>
137-
<goal>run</goal>
138-
</goals>
139-
<configuration>
140-
<target>
141-
<jar jarfile="${project.build.directory}/vavi-qlgenerator.jar"
142-
manifest="src/qlgenerator/resources/manifest.mf">
143-
<fileset dir="${project.build.outputDirectory}">
144-
<include name="vavi/apps/qlgenerator/*.class" />
145-
</fileset>
146-
</jar>
147-
</target>
148-
</configuration>
149-
</execution>
150-
</executions>
151-
</plugin>
152166
<plugin>
153167
<groupId>org.apache.maven.plugins</groupId>
154168
<artifactId>maven-surefire-plugin</artifactId>
@@ -182,7 +196,7 @@
182196
<dependency>
183197
<groupId>org.junit</groupId>
184198
<artifactId>junit-bom</artifactId>
185-
<version>5.9.1</version>
199+
<version>5.9.2</version>
186200
<type>pom</type>
187201
<scope>import</scope>
188202
</dependency>
@@ -193,14 +207,9 @@
193207
<dependency>
194208
<groupId>com.github.umjammer</groupId> <!-- com.github.umjammer -->
195209
<artifactId>vavi-commons</artifactId>
196-
<version>1.1.8</version>
210+
<version>1.1.9</version>
197211
</dependency>
198212

199-
<dependency>
200-
<groupId>com.github.umjammer</groupId>
201-
<artifactId>vavi-nio-file</artifactId>
202-
<version>0.0.15</version>
203-
</dependency>
204213
<dependency>
205214
<groupId>com.github.umjammer</groupId>
206215
<artifactId>java7-fs-base</artifactId>
@@ -289,5 +298,12 @@
289298
<version>3.8.5</version>
290299
<scope>test</scope>
291300
</dependency>
301+
302+
<dependency>
303+
<groupId>com.github.k9mail</groupId>
304+
<artifactId>jutf7</artifactId>
305+
<version>master-SNAPSHOT</version>
306+
<scope>test</scope>
307+
</dependency>
292308
</dependencies>
293309
</project>

src/main/java/aaru/checksum/CdChecksums.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static void initEcc() {
102102

103103
for (int i = 0; i < 256; i++) {
104104
int edc = i;
105-
int j = (int) ((i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0));
105+
int j = (i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0);
106106
eccFTable[i] = (byte) j;
107107
eccBTable[i ^ j] = (byte) i;
108108

@@ -249,20 +249,18 @@ static Boolean checkCdSectorChannel(byte[] channel, /*out*/ Boolean[] correctEcc
249249
}
250250

251251
if ((channel[0x00F] & 0x03) == 0x02) { // mode (1 byte)
252-
//Debug.printf("CD checksum", "Mode 2 sector at address %2x:%2x:%2x",
253-
// channel[0x00C], channel[0x00D], channel[0x00E]);
252+
//Debug.printf("CD checksum", "Mode 2 sector at address %2x:%2x:%2x", channel[0x00C], channel[0x00D], channel[0x00E]);
254253
byte[] mode2Sector = new byte[channel.length - 0x10];
255254
System.arraycopy(channel, 0x10, mode2Sector, 0, mode2Sector.length);
256255

257-
if ((channel[0x012] & 0x20) == 0x20) // mode 2 form 2
258-
{
256+
if ((channel[0x012] & 0x20) == 0x20) { // mode 2 form 2
259257
if (channel[0x010] != channel[0x014] ||
260258
channel[0x011] != channel[0x015] ||
261259
channel[0x012] != channel[0x016] ||
262-
channel[0x013] != channel[0x017])
263-
Debug.printf("CD checksum",
264-
"Subheader copies differ in mode 2 form 2 sector at address: %2x:%2x:%2x",
260+
channel[0x013] != channel[0x017]) {
261+
Debug.printf("CD checksum", "Subheader copies differ in mode 2 form 2 sector at address: %2x:%2x:%2x",
265262
channel[0x00C], channel[0x00D], channel[0x00E]);
263+
}
266264

267265
int storedEdc = ByteUtil.readLeInt(mode2Sector, 0x91C);
268266

@@ -349,7 +347,7 @@ static int computeEdc(int edc, byte[] src, int size) {
349347
}
350348

351349
static Boolean checkCdSectorSubChannel(byte[] subchannel) {
352-
Boolean status = true;
350+
boolean status = true;
353351
byte[] qSubChannel = new byte[12];
354352
byte[] cdTextPack1 = new byte[18];
355353
byte[] cdTextPack2 = new byte[18];

src/main/java/aaru/checksum/Crc16Context.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void update(byte[] data) {
6767

6868
/** Returns a byte array of the hash value. */
6969
public byte[] doFinal() {
70-
short crc = 0;
70+
short crc;
7171

7272
if (inverse)
7373
crc = (short) ~(hashInt[0] ^ finalSeed);
@@ -235,9 +235,9 @@ public static String file(String filename, /*out*/ byte[][] hash, short polynomi
235235

236236
while (read > 0) {
237237
if (inverse)
238-
stepInverse(/*ref*/ localHashInt, localTable, buffer, (int) read);
238+
stepInverse(/*ref*/ localHashInt, localTable, buffer, read);
239239
else
240-
step(/*ref*/ localHashInt, localTable, buffer, (int) read);
240+
step(/*ref*/ localHashInt, localTable, buffer, read);
241241

242242
read = fileStream.read(buffer, 0, 65536);
243243
}

src/main/java/aaru/commonType/Partition.java

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public int hashCode() {
9494
* @param other Partition to compare with
9595
* @return A value that indicates the relative equality of the partitions being compared.
9696
*/
97+
@Override
9798
public int compareTo(Partition other) {
9899
if (start == other.start &&
99100
end() == other.end())

src/main/java/aaru/commonType/Track.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class Track {
4545
/** Which filter stores this track */
4646
public Stream filter;
4747
/** Indexes, 00 to 99 and sector offset */
48-
public Map<Short, Integer> indexes;
48+
public Map<Integer, Integer> indexes;
4949
/** Track pre-gap */
5050
public long preGap;
5151
/** How many main channel bytes per sector are in the file with this track */

src/main/java/aaru/decoder/Sector.java

-3
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,8 @@ public static String Prettify(byte[] buffer) {
407407
}
408408

409409
sb.append(String.format("File number: %d", buffer[16])).append("\n");
410-
;
411410
sb.append(String.format("Channel number: %d", buffer[17])).append("\n");
412-
;
413411
sb.append(String.format("Coding information number: %d", buffer[19])).append("\n");
414-
;
415412

416413
if ((buffer[18] & 0x80) == 0x80)
417414
sb.append("End of file.").append("\n");

src/main/java/aaru/decoder/SectorBuilder.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public SectorBuilder() {
4646

4747
for (int i = 0; i < 256; i++) {
4848
int edc = i;
49-
int j = (int) ((i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0));
49+
int j = (i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0);
5050
eccFTable[i] = (byte) j;
5151
eccBTable[i ^ j] = (byte) i;
5252

@@ -58,7 +58,7 @@ public SectorBuilder() {
5858
}
5959

6060
static Tuple3<Byte, Byte, Byte> lbaToMsf(long pos) {
61-
return new Tuple3((byte) ((pos + 150) / 75 / 60), (byte) ((pos + 150) / 75 % 60), (byte) ((pos + 150) % 75));
61+
return new Tuple3<>((byte) ((pos + 150) / 75 / 60), (byte) ((pos + 150) / 75 % 60), (byte) ((pos + 150) % 75));
6262
}
6363

6464
/**
@@ -113,7 +113,7 @@ public void reconstructPrefix(/*ref*/ byte[] sector, TrackType type, long lba) {
113113

114114
break;
115115
default:
116-
return;
116+
break;
117117
}
118118
}
119119

0 commit comments

Comments
 (0)