@Test public void testGetStreamPosition() throws Exception { AbstractMemory memory = new MockMemory(ByteOrder.BIG_ENDIAN); memory.addMemorySource(new MockMemorySource(new byte[] { (byte)0xA0}, 0, 0x10000, 0x10000)); memory.addMemorySource(new MockMemorySource(new byte[] { (byte)0xB0}, 0, 0x20000, 0x10000)); IMemoryImageInputStream sut = new IMemoryImageInputStream(memory, 0x10000); long pos = sut.getStreamPosition(); assertEquals(0xA0,sut.read()); assertEquals(0xA0,sut.read()); assertEquals(pos + 2,sut.getStreamPosition()); }
@Override public long getStreamPosition() throws IOException { return address; }
IMemoryImageInputStream extends ImageInputStreamImpl { @Override public long getStreamPosition() throws IOException { return address; } }
IMemoryImageInputStream extends ImageInputStreamImpl { @Override public long getStreamPosition() throws IOException { return address; } IMemoryImageInputStream(IMemory memory, long startingAddress); }
IMemoryImageInputStream extends ImageInputStreamImpl { @Override public long getStreamPosition() throws IOException { return address; } IMemoryImageInputStream(IMemory memory, long startingAddress); @Override int read(byte[] buffer, int offset, int length); @Override int read(); @Override long getStreamPosition(); @Override void seek(long pos); }
IMemoryImageInputStream extends ImageInputStreamImpl { @Override public long getStreamPosition() throws IOException { return address; } IMemoryImageInputStream(IMemory memory, long startingAddress); @Override int read(byte[] buffer, int offset, int length); @Override int read(); @Override long getStreamPosition(); @Override void seek(long pos);  }