Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>6</source>
<target>6</target>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/kaitai/struct/ByteBufferKaitaiStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public void seek(long newPos) {
}

@Override
public int pos() {
public long pos() {
return bb.position();
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/kaitai/struct/KaitaiStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public abstract class KaitaiStream implements Closeable {
* Get current position of a stream pointer.
* @return pointer position, number of bytes from the beginning of the stream
*/
abstract public int pos();
abstract public long pos();

/**
* Get total size of the stream in bytes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ public void seek(long newPos) {
}

@Override
public int pos() {
public long pos() {
try {
// FIXME cast
return (int) raf.getFilePointer();
return raf.getFilePointer();
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down