-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ingvord
committed
May 22, 2021
1 parent
d6a3d9a
commit d22e885
Showing
4 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,18 +20,20 @@ | |
* @author Igor Khokhriakov <[email protected]> | ||
* @since 11.07.2015 | ||
*/ | ||
public class GenericBlob implements NexusWriter { | ||
public class GenericBlob extends NexusWriter { | ||
private final Logger logger = LoggerFactory.getLogger(GenericBlob.class); | ||
|
||
public final List<Element> elements = new ArrayList<>(); | ||
private final boolean append; | ||
|
||
|
||
public GenericBlob(boolean append) { | ||
super(null); | ||
this.append = append; | ||
} | ||
|
||
public GenericBlob(PipeBlob blob) throws DevFailed { | ||
super(null); | ||
this.append = blob.get(0).extractBooleanArray()[0]; | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,12 @@ | |
* @author Igor Khokhriakov <[email protected]> | ||
* @since 13.07.2015 | ||
*/ | ||
public interface NexusWriter { | ||
void write(NxFile file) throws IOException; | ||
public abstract class NexusWriter { | ||
final String nxPath; | ||
|
||
public NexusWriter(String nxPath) { | ||
this.nxPath = nxPath; | ||
} | ||
|
||
abstract void write(NxFile file) throws IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,14 @@ | |
* @author Igor Khokhriakov <[email protected]> | ||
* @since 11.07.2015 | ||
*/ | ||
public class StatusServerBlob implements NexusWriter { | ||
public class StatusServerBlob extends NexusWriter { | ||
private final Logger logger = LoggerFactory.getLogger(GenericBlob.class); | ||
|
||
public GenericBlob values = new GenericBlob(true); | ||
public GenericBlob times = new GenericBlob(true); | ||
|
||
public StatusServerBlob(PipeBlob blob) throws DevFailed { | ||
super(null); | ||
for (PipeDataElement dataElement : blob) { | ||
PipeBlob innerBlob = dataElement.extractPipeBlob(); | ||
String name = innerBlob.getName(); | ||
|