made the read method compile
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352776 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf7181ba81
commit
37371cc919
@ -56,6 +56,7 @@
|
|||||||
package org.apache.poi.hpsf;
|
package org.apache.poi.hpsf;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import org.apache.poi.util.LittleEndian;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* REWRITE ME
|
* REWRITE ME
|
||||||
@ -111,34 +112,30 @@ public class ClassID {
|
|||||||
public byte[] read(byte[] src, int offset) {
|
public byte[] read(byte[] src, int offset) {
|
||||||
byte[] retval = new byte[24];
|
byte[] retval = new byte[24];
|
||||||
|
|
||||||
throw new RuntimeException("This fucntion must be rewritten");
|
//throw new RuntimeException("This fucntion must be rewritten");
|
||||||
/*
|
|
||||||
Object[] b = new Object[11];
|
//Number[] b = new Number[11];
|
||||||
b[0] = new Long(LittleEndian.getUInt(src, offset));
|
|
||||||
b[1] = new Integer(LittleEndian.getInt(src, offset += LittleEndian.INT_SIZE));
|
//b[0] = new Integer(LittleEndian.getInt(src, offset));
|
||||||
b[2] = new Integer(LittleEndian.getInt(src, offset += LittleEndian.INT_SIZE));
|
//transfer the first Int from little to big endian
|
||||||
b[3] = new Byte(LittleEndian.getUnsignedByte(src, offset += LittleEndian.INT_SIZE);
|
retval[0] = src[3];
|
||||||
b[4] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
retval[1] = src[2];
|
||||||
b[5] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
retval[2] = src[1];
|
||||||
b[6] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
retval[3] = src[0];
|
||||||
b[7] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
|
||||||
b[8] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
//b[1] = new Short(LittleEndian.getInt(src, offset += LittleEndian.INT_SIZE));
|
||||||
b[9] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
//transfer the second short from little to big endian
|
||||||
b[10] = new Byte(LittleEndian.getUnsignedByte(src, offset += 1));
|
retval[4] = src[5];
|
||||||
int capacity = 24;
|
retval[5] = src[4];
|
||||||
// for (int i = 0; i < b.length; i++) {
|
|
||||||
// capacity += b[i].getBytes().length;
|
//b[2] = new Short(LittleEndian.getInt(src, offset += LittleEndian.SHORT_SIZE));
|
||||||
// }
|
//transfer the third short from little to big endian
|
||||||
bytes = new byte[capacity];
|
retval[6] = src[7];
|
||||||
int pos = 0;
|
retval[7] = src[6];
|
||||||
|
|
||||||
for (int i = 0; i < b.length; i++) {
|
System.arraycopy(src, 8, retval, 8, retval.length - 8);
|
||||||
byte[] s = b[i].getBytes();
|
|
||||||
for (int j = 0; j < s.length; j++) {
|
return retval;
|
||||||
bytes[pos++] = s[j];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return bytes;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user