putDouble() public abstract method

public abstract putDouble ( double value ) : ByteBufferN
value double
return ByteBufferN
コード例 #1
0
ファイル: BasicByte.cs プロジェクト: Mazrick/jni4net
        private static void testHet(int level, ByteBufferN b)
        {
            int p = b.position();
            b.limit(b.capacity());
            show(level, b);
            outt.print("    put:");

            b.putChar((char)1);
            b.putChar(Character.MAX_VALUE);
            outt.print(" char");

            b.putShort(1);
            b.putShort(Short.MAX_VALUE);
            outt.print(" short");

            b.putInt(1);
            b.putInt(Integer.MAX_VALUE);
            outt.print(" int");

            b.putLong(1);
            b.putLong(Long.MAX_VALUE);
            outt.print(" long");

            b.putFloat(1);
            b.putFloat(Float.MIN_VALUE);
            b.putFloat(Float.MAX_VALUE);
            outt.print(" float");

            b.putDouble(1);
            b.putDouble(Double.MIN_VALUE);
            b.putDouble(Double.MAX_VALUE);
            outt.print(" double");

            outt.println();
            b.limit(b.position());
            b.position(p);
            show(level, b);
            outt.print("    get:");

            ck(b, b.getChar(), 1);
            ck(b, b.getChar(), Character.MAX_VALUE);
            outt.print(" char");

            ck(b, b.getShort(), 1);
            ck(b, b.getShort(), Short.MAX_VALUE);
            outt.print(" short");

            ck(b, b.getInt(), 1);
            ck(b, b.getInt(), Integer.MAX_VALUE);
            outt.print(" int");

            ck(b, b.getLong(), 1);
            ck(b, b.getLong(), Long.MAX_VALUE);
            outt.print(" long");

            ck(b, (long)b.getFloat(), 1);
            ck(b, (long)b.getFloat(), (long)Float.MIN_VALUE);
            ck(b, (long)b.getFloat(), (long)Float.MAX_VALUE);
            outt.print(" float");

            ck(b, (long)b.getDouble(), 1);
            ck(b, (long)b.getDouble(), (long)Double.MIN_VALUE);
            ck(b, (long)b.getDouble(), (long)Double.MAX_VALUE);
            outt.print(" double");

            outt.println();
        }