public class

ChannelUtil

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.io.ChannelUtil

Class Overview

Utility methods for Channels, in particular, SeekableByteChannels.

Summary

Public Constructors
ChannelUtil()
Public Methods
static byte get(SeekableByteChannel channel, long position)
static byte[] getAllFrom(SeekableByteChannel channel, long position)
static int getBEInt(SeekableByteChannel channel, long position)
static long getBELong(SeekableByteChannel channel, long position)
static short getBEShort(SeekableByteChannel channel, long position)
static int getInt(SeekableByteChannel channel, long position, ByteOrder endianness)
static int getLEInt(SeekableByteChannel channel, long position)
static long getLELong(SeekableByteChannel channel, long position)
static short getLEShort(SeekableByteChannel channel, long position)
static long getLong(SeekableByteChannel channel, long position, ByteOrder endianness)
static short getShort(SeekableByteChannel channel, long position, ByteOrder endianness)
static ByteBuffer read(SeekableByteChannel channel, long position, int size, boolean isBigEndian)
static ByteBuffer read(SeekableByteChannel channel, long position, int size, boolean isBigEndian, ByteBuffer buffer)
static ByteBuffer readBestEffort(SeekableByteChannel channel, long position, int size, boolean isBigEndian, ByteBuffer buffer)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ChannelUtil ()

Public Methods

public static byte get (SeekableByteChannel channel, long position)

Throws
IOException

public static byte[] getAllFrom (SeekableByteChannel channel, long position)

Throws
IOException

public static int getBEInt (SeekableByteChannel channel, long position)

Throws
IOException

public static long getBELong (SeekableByteChannel channel, long position)

Throws
IOException

public static short getBEShort (SeekableByteChannel channel, long position)

Throws
IOException

public static int getInt (SeekableByteChannel channel, long position, ByteOrder endianness)

Throws
IOException

public static int getLEInt (SeekableByteChannel channel, long position)

Throws
IOException

public static long getLELong (SeekableByteChannel channel, long position)

Throws
IOException

public static short getLEShort (SeekableByteChannel channel, long position)

Throws
IOException

public static long getLong (SeekableByteChannel channel, long position, ByteOrder endianness)

Throws
IOException

public static short getShort (SeekableByteChannel channel, long position, ByteOrder endianness)

Throws
IOException

public static ByteBuffer read (SeekableByteChannel channel, long position, int size, boolean isBigEndian)

Throws
IOException

public static ByteBuffer read (SeekableByteChannel channel, long position, int size, boolean isBigEndian, ByteBuffer buffer)

Throws
IOException

public static ByteBuffer readBestEffort (SeekableByteChannel channel, long position, int size, boolean isBigEndian, ByteBuffer buffer)

Throws
IOException