• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kit-data-manager / ro-crate-java / #365

23 Apr 2025 11:51AM UTC coverage: 86.427% (+0.4%) from 85.989%
#365

Pull #247

github

web-flow
Merge b341acf22 into fe1bb105f
Pull Request #247: Generalize reading and writing crates

249 of 278 new or added lines in 16 files covered. (89.57%)

2 existing lines in 2 files now uncovered.

1872 of 2166 relevant lines covered (86.43%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/src/main/java/edu/kit/datamanager/ro_crate/writer/Writers.java
1
package edu.kit.datamanager.ro_crate.writer;
2

3
import java.io.OutputStream;
4

5
/**
6
 * Utility class for creating instances of different crate writers.
7
 * This class is not meant to be instantiated.
8
 */
9
public class Writers {
10

11
    /**
12
     * Prevents instantiation of this utility class.
13
     */
14
    private Writers() {}
15

16
    /**
17
     * Creates a new instance of a crate writer that writes to a folder.
18
     *
19
     * @return a new instance of {@link CrateWriter} for writing to a folder
20
     */
21
    public static CrateWriter<String> newFolderWriter() {
NEW
22
        return new CrateWriter<>(new FolderStrategy());
×
23
    }
24

25
    /**
26
     * Creates a new instance of a crate writer that writes to a zip stream.
27
     *
28
     * @return a new instance of {@link CrateWriter} for writing to a zip stream
29
     */
30
    public static CrateWriter<OutputStream> newZipStreamWriter() {
31
        return new CrateWriter<>(new ZipStreamStrategy());
1✔
32
    }
33

34
    /**
35
     * Creates a new instance of a crate writer that writes to a zip file.
36
     *
37
     * @return a new instance of {@link CrateWriter} for writing to a zip file
38
     */
39
    public static CrateWriter<String> newZipFileWriter() {
NEW
40
        return new CrateWriter<>(new ZipStrategy());
×
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc