Skip to content
Snippets Groups Projects
Commit b6806878 authored by Vojtech Moravec's avatar Vojtech Moravec
Browse files

Enable cloning of QCMPFileHeader.

parent 6ca071c9
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ import java.io.DataInputStream; ...@@ -8,7 +8,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
public class QCMPFileHeader { public class QCMPFileHeader implements Cloneable {
public static final int BASE_QCMP_HEADER_SIZE = 23; public static final int BASE_QCMP_HEADER_SIZE = 23;
public static final String QCMP_MAGIC_VALUE = "QCMPFILE"; public static final String QCMP_MAGIC_VALUE = "QCMPFILE";
...@@ -57,6 +57,19 @@ public class QCMPFileHeader { ...@@ -57,6 +57,19 @@ public class QCMPFileHeader {
return true; return true;
} }
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
public QCMPFileHeader copyOf() {
try {
return (QCMPFileHeader) this.clone();
} catch (CloneNotSupportedException e) {
return null;
}
}
public void writeHeader(DataOutputStream outputStream) throws IOException { public void writeHeader(DataOutputStream outputStream) throws IOException {
outputStream.writeBytes(QCMP_MAGIC_VALUE); outputStream.writeBytes(QCMP_MAGIC_VALUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment