public int compareTo( Object o) { return tag.compareTo( ((IFDEntry)o).tag); }
/** sort by number */ public int compareTo( Object o) { return code - ((Tag) o).getCode(); }
IFDEntry data = findTag(Tag.get(location)); if (data == null) { System.out.println("********ERROR parseGeoInfo: cant find Tag code = " + location);
IFDEntry data = findTag(Tag.get(location)); if (data == null) { System.out.println("********ERROR parseGeoInfo: cant find Tag code = " + location);
private IFDEntry readIFDEntry(FileChannel channel, int start) throws IOException { if (debugRead) System.out.println("readIFDEntry starting position to " + start); channel.position(start); ByteBuffer buffer = ByteBuffer.allocate(12); buffer.order(byteOrder); channel.read(buffer); buffer.flip(); if (showBytes) printBytes(System.out, "IFDEntry bytes", buffer, 12); IFDEntry ifd; buffer.position(0); int code = readUShortValue(buffer); Tag tag = Tag.get(code); if (tag == null) tag = new Tag(code); FieldType type = FieldType.get(readUShortValue(buffer)); int count = buffer.getInt(); ifd = new IFDEntry(tag, type, count); if (ifd.count * ifd.type.size <= 4) { readValues(buffer, ifd); } else { int offset = buffer.getInt(); if (debugRead) System.out.println("position to " + offset); channel.position(offset); ByteBuffer vbuffer = ByteBuffer.allocate(ifd.count * ifd.type.size); vbuffer.order(byteOrder); channel.read(vbuffer); vbuffer.flip(); readValues(vbuffer, ifd); } return ifd; }
/** sort by number */ public int compareTo( Object o) { return code - ((Tag) o).getCode(); }
public int compareTo( Object o) { return tag.compareTo( ((IFDEntry)o).tag); }
IFDEntry data = findTag(Tag.get(location)); if (data == null) { System.out.println("********ERROR parseGeoInfo: cant find Tag code = " + location);
/** sort by number */ public int compareTo( Object o) { return code - ((Tag) o).getCode(); }
public int compareTo( Object o) { return tag.compareTo( ((IFDEntry)o).tag); }
private void writeIFDEntry(FileChannel channel, IFDEntry ifd, int start) throws IOException { channel.position(start); ByteBuffer buffer = ByteBuffer.allocate(12); buffer.putShort((short) ifd.tag.getCode()); buffer.putShort((short) ifd.type.code); buffer.putInt(ifd.count); int size = ifd.count * ifd.type.size; if (size <= 4) { int done = writeValues(buffer, ifd); for (int k = 0; k < 4 - done; k++) // fill out to 4 bytes buffer.put((byte) 0); buffer.flip(); channel.write(buffer); } else { // write offset buffer.putInt(nextOverflowData); buffer.flip(); channel.write(buffer); // write data channel.position(nextOverflowData); //System.out.println(" write offset = "+ifd.tag.getName()); ByteBuffer vbuffer = ByteBuffer.allocate(size); writeValues(vbuffer, ifd); vbuffer.flip(); channel.write(vbuffer); nextOverflowData += size; } }
private void writeIFDEntry(FileChannel channel, IFDEntry ifd, int start) throws IOException { channel.position(start); ByteBuffer buffer = ByteBuffer.allocate(12); buffer.putShort((short) ifd.tag.getCode()); buffer.putShort((short) ifd.type.code); buffer.putInt(ifd.count); int size = ifd.count * ifd.type.size; if (size <= 4) { int done = writeValues(buffer, ifd); for (int k = 0; k < 4 - done; k++) // fill out to 4 bytes buffer.put((byte) 0); buffer.flip(); channel.write(buffer); } else { // write offset buffer.putInt(nextOverflowData); buffer.flip(); channel.write(buffer); // write data channel.position(nextOverflowData); //System.out.println(" write offset = "+ifd.tag.getName()); ByteBuffer vbuffer = ByteBuffer.allocate(size); writeValues(vbuffer, ifd); vbuffer.flip(); channel.write(vbuffer); nextOverflowData += size; } }
private void writeIFDEntry(FileChannel channel, IFDEntry ifd, int start) throws IOException { channel.position(start); ByteBuffer buffer = ByteBuffer.allocate(12); buffer.putShort((short) ifd.tag.getCode()); buffer.putShort((short) ifd.type.code); buffer.putInt(ifd.count); int size = ifd.count * ifd.type.size; if (size <= 4) { int done = writeValues(buffer, ifd); for (int k = 0; k < 4 - done; k++) // fill out to 4 bytes buffer.put((byte) 0); buffer.flip(); channel.write(buffer); } else { // write offset buffer.putInt(nextOverflowData); buffer.flip(); channel.write(buffer); // write data channel.position(nextOverflowData); //System.out.println(" write offset = "+ifd.tag.getName()); ByteBuffer vbuffer = ByteBuffer.allocate(size); writeValues(vbuffer, ifd); vbuffer.flip(); channel.write(vbuffer); nextOverflowData += size; } }
values[count++] = Tag.GeoDoubleParamsTag.getCode(); // extra double values here values[count++] = geokey.count(); values[count++] = dcounter; values[count++] = Tag.GeoAsciiParamsTag.getCode(); // extra double values here values[count++] = Tag.GeoKeyDirectoryTag.getCode(); // extra int values here values[count++] = geokey.count(); values[count++] = icounter;
values[count++] = Tag.GeoDoubleParamsTag.getCode(); // extra double values here values[count++] = geokey.count(); values[count++] = dcounter; values[count++] = Tag.GeoAsciiParamsTag.getCode(); // extra double values here values[count++] = Tag.GeoKeyDirectoryTag.getCode(); // extra int values here values[count++] = geokey.count(); values[count++] = icounter;
values[count++] = Tag.GeoDoubleParamsTag.getCode(); // extra double values here values[count++] = geokey.count(); values[count++] = dcounter; values[count++] = Tag.GeoAsciiParamsTag.getCode(); // extra double values here values[count++] = Tag.GeoKeyDirectoryTag.getCode(); // extra int values here values[count++] = geokey.count(); values[count++] = icounter;