Skip to content

Commit 0f0cc60

Browse files
committed
Add constructors taking wrapped location directly
1 parent 72bffe0 commit 0f0cc60

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>scijava-common</artifactId>
13-
<version>2.95.2-SNAPSHOT</version>
13+
<version>2.96.0-SNAPSHOT</version>
1414

1515
<name>SciJava Common</name>
1616
<description>SciJava Common is a shared library for SciJava software. It provides a plugin framework, with an extensible mechanism for service discovery, backed by its own annotation processor, so that plugins can be loaded dynamically. It is used by downstream projects in the SciJava ecosystem, such as ImageJ and SCIFIO.</description>

src/main/java/org/scijava/io/handle/BytesHandle.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public class BytesHandle extends AbstractDataHandle<BytesLocation> {
4848

4949
private long offset = 0;
5050

51+
// -- Constructors --
52+
53+
public BytesHandle() { }
54+
55+
public BytesHandle(final BytesLocation location) {
56+
set(location);
57+
}
58+
5159
// -- DataHandle methods --
5260

5361
@Override

src/main/java/org/scijava/io/handle/DummyHandle.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ public class DummyHandle extends AbstractDataHandle<DummyLocation> {
4848
private long offset;
4949
private long length;
5050

51+
// -- Constructors --
52+
53+
public DummyHandle() { }
54+
55+
public DummyHandle(final DummyLocation location) {
56+
set(location);
57+
}
58+
5159
// -- DataHandle methods --
5260

5361
@Override

src/main/java/org/scijava/io/handle/FileHandle.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ public class FileHandle extends AbstractDataHandle<FileLocation> {
5858
/** True iff the {@link #close()} has already been called. */
5959
private boolean closed;
6060

61+
// -- Constructors --
62+
63+
public FileHandle() { }
64+
65+
public FileHandle(final FileLocation location) {
66+
set(location);
67+
}
68+
6169
// -- FileHandle methods --
6270

6371
/**

0 commit comments

Comments
 (0)