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)
static byte get(SeekableByteChannel channel, long position)
static byte[] getAllFrom(SeekableByteChannel channel, long position)
static int getBEInt(SeekableByteChannel channel)
static int getBEInt(SeekableByteChannel channel, long position)
static long getBELong(SeekableByteChannel channel, long position)
static long getBELong(SeekableByteChannel channel)
static short getBEShort(SeekableByteChannel channel, long position)
static short getBEShort(SeekableByteChannel channel)
static byte[] getBytes(SeekableByteChannel channel, int size)
static byte[] getBytes(SeekableByteChannel channel, long position, int size)
static byte[] getBytesUntil(SeekableByteChannel channel, int stopper, int maxsize, boolean throwOnEOS)
static int getInt(SeekableByteChannel channel, long position, ByteOrder endianness)
static int getInt(SeekableByteChannel channel, ByteOrder endianness)
static int getLEInt(SeekableByteChannel channel, long position)
static int getLEInt(SeekableByteChannel channel)
static long getLELong(SeekableByteChannel channel)
static long getLELong(SeekableByteChannel channel, long position)
static short getLEShort(SeekableByteChannel channel)
static short getLEShort(SeekableByteChannel channel, long position)
static long getLong(SeekableByteChannel channel, ByteOrder endianness)
static long getLong(SeekableByteChannel channel, long position, ByteOrder endianness)
static short getShort(SeekableByteChannel channel, long position, ByteOrder endianness)
static short getShort(SeekableByteChannel channel, 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)

Throws
IOException

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)

Throws
IOException

public static int getBEInt (SeekableByteChannel channel, long position)

Throws
IOException

public static long getBELong (SeekableByteChannel channel, long position)

Throws
IOException

public static long getBELong (SeekableByteChannel channel)

Throws
IOException

public static short getBEShort (SeekableByteChannel channel, long position)

Throws
IOException

public static short getBEShort (SeekableByteChannel channel)

Throws
IOException

public static byte[] getBytes (SeekableByteChannel channel, int size)

Throws
IOException

public static byte[] getBytes (SeekableByteChannel channel, long position, int size)

Throws
IOException

public static byte[] getBytesUntil (SeekableByteChannel channel, int stopper, int maxsize, boolean throwOnEOS)

Throws
IOException

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

Throws
IOException

public static int getInt (SeekableByteChannel channel, ByteOrder endianness)

Throws
IOException

public static int getLEInt (SeekableByteChannel channel, long position)

Throws
IOException

public static int getLEInt (SeekableByteChannel channel)

Throws
IOException

public static long getLELong (SeekableByteChannel channel)

Throws
IOException

public static long getLELong (SeekableByteChannel channel, long position)

Throws
IOException

public static short getLEShort (SeekableByteChannel channel)

Throws
IOException

public static short getLEShort (SeekableByteChannel channel, long position)

Throws
IOException

public static long getLong (SeekableByteChannel channel, ByteOrder endianness)

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 short getShort (SeekableByteChannel channel, 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