当前位置: 首页>>代码示例>>Java>>正文


Java BufferUnderflowException.getMessage方法代码示例

本文整理汇总了Java中java.nio.BufferUnderflowException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java BufferUnderflowException.getMessage方法的具体用法?Java BufferUnderflowException.getMessage怎么用?Java BufferUnderflowException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.nio.BufferUnderflowException的用法示例。


在下文中一共展示了BufferUnderflowException.getMessage方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFully

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public void readFully(byte b[], int off, int len) throws IOException {
    try {
        bb.get(b, off, len);
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例2: readBoolean

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public boolean readBoolean() throws IOException {
    try {
        int ch = bb.get();
        return (ch != 0);
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:ModuleInfo.java

示例3: readByte

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public byte readByte() throws IOException {
    try {
        return bb.get();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例4: readUnsignedByte

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public int readUnsignedByte() throws IOException {
    try {
        return ((int) bb.get()) & 0xff;
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例5: readShort

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public short readShort() throws IOException {
    try {
        return bb.getShort();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例6: readUnsignedShort

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public int readUnsignedShort() throws IOException {
    try {
        return ((int) bb.getShort()) & 0xffff;
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例7: readChar

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public char readChar() throws IOException {
    try {
        return bb.getChar();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例8: readInt

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public int readInt() throws IOException {
    try {
        return bb.getInt();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例9: readLong

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public long readLong() throws IOException {
    try {
        return bb.getLong();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例10: readFloat

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public float readFloat() throws IOException {
    try {
        return bb.getFloat();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例11: readDouble

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
@Override
public double readDouble() throws IOException {
    try {
        return bb.getDouble();
    } catch (BufferUnderflowException e) {
        throw new EOFException(e.getMessage());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:ModuleInfo.java

示例12: checkBtreeLeaf

import java.nio.BufferUnderflowException; //导入方法依赖的package包/类
/**
 * Check a Btree leaf.
 */
private static <K, V> void checkBtreeLeaf( RecordManager recordManager, BtreeInfo<K, V> btreeInfo,
    Map<String, int[]> checkedPages, int nbElems, long revision, ByteBuffer byteBuffer, PageIO[] pageIos )
    throws Exception
{
    // Read each key and value
    for ( int i = 0; i < nbElems; i++ )
    {
        try
        {
            // Read the number of values
            int nbValues = byteBuffer.getInt();

            if ( nbValues < 0 )
            {
                // This is a sub-btree. Read the offset
                long subBtreeOffset = byteBuffer.getLong();

                // And process the sub-btree
                checkBtree( recordManager, subBtreeOffset, checkedPages );

                // Now, process the key
                // The key length
                byteBuffer.getInt();

                // The key itself
                btreeInfo.keySerializer.deserialize( byteBuffer );
            }
            else
            {
                // just deserialize the keys and values
                // The value
                byteBuffer.getInt();
                btreeInfo.valueSerializer.deserialize( byteBuffer );

                // the key
                byteBuffer.getInt();

                btreeInfo.keySerializer.deserialize( byteBuffer );
            }
        }
        catch ( BufferUnderflowException bue )
        {
            throw new InvalidBTreeException( "The BOB leaf byte buffer is too short : " + bue.getMessage() );
        }
    }
}
 
开发者ID:apache,项目名称:directory-mavibot,代码行数:50,代码来源:MavibotInspector.java


注:本文中的java.nio.BufferUnderflowException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。