示例#1
0
 private int GetInt(long a)
 {
     if (Unaligned)
     {
         int x = @unsafe.getInt(a);
         return(NativeByteOrder ? x : Bits.Swap(x));
     }
     return(Bits.GetInt(a, BigEndian));
 }
示例#2
0
 private long GetLong(long a)
 {
     if (Unaligned)
     {
         long x = @unsafe.getLong(a);
         return(NativeByteOrder ? x : Bits.Swap(x));
     }
     return(Bits.GetLong(a, BigEndian));
 }
示例#3
0
 private char GetChar(long a)
 {
     if (Unaligned)
     {
         char x = @unsafe.getChar(a);
         return(NativeByteOrder ? x : Bits.Swap(x));
     }
     return(Bits.GetChar(a, BigEndian));
 }
示例#4
0
 private float GetFloat(long a)
 {
     if (Unaligned)
     {
         int x = @unsafe.getInt(a);
         return(Float.intBitsToFloat(NativeByteOrder ? x : Bits.Swap(x)));
     }
     return(Bits.GetFloat(a, BigEndian));
 }
示例#5
0
 private double GetDouble(long a)
 {
     if (Unaligned)
     {
         long x = @unsafe.getLong(a);
         return(Double.longBitsToDouble(NativeByteOrder ? x : Bits.Swap(x)));
     }
     return(Bits.GetDouble(a, BigEndian));
 }
示例#6
0
 private ByteBuffer PutFloat(long a, float x)
 {
     if (Unaligned)
     {
         int y = Float.floatToRawIntBits(x);
         @unsafe.putInt(a, (NativeByteOrder ? y : Bits.Swap(y)));
     }
     else
     {
         Bits.PutFloat(a, x, BigEndian);
     }
     return(this);
 }
示例#7
0
 private ByteBuffer PutShort(long a, short x)
 {
     if (Unaligned)
     {
         short y = (x);
         @unsafe.putShort(a, (NativeByteOrder ? y : Bits.Swap(y)));
     }
     else
     {
         Bits.PutShort(a, x, BigEndian);
     }
     return(this);
 }
示例#8
0
 private ByteBuffer PutLong(long a, long x)
 {
     if (Unaligned)
     {
         long y = (x);
         @unsafe.putLong(a, (NativeByteOrder ? y : Bits.Swap(y)));
     }
     else
     {
         Bits.PutLong(a, x, BigEndian);
     }
     return(this);
 }
示例#9
0
 private ByteBuffer PutDouble(long a, double x)
 {
     if (Unaligned)
     {
         long y = Double.doubleToRawLongBits(x);
         @unsafe.putLong(a, (NativeByteOrder ? y : Bits.Swap(y)));
     }
     else
     {
         Bits.PutDouble(a, x, BigEndian);
     }
     return(this);
 }
示例#10
0
 public override float Get()
 {
     return(Float.intBitsToFloat(Bits.Swap(@unsafe.getInt(Ix(NextGetIndex())))));
 }
 public override DoubleBuffer Put(int i, double x)
 {
     @unsafe.putLong(Ix(CheckIndex(i)), Bits.Swap(Double.doubleToRawLongBits(x)));
     return(this);
 }
 public override DoubleBuffer Put(double x)
 {
     @unsafe.putLong(Ix(NextPutIndex()), Bits.Swap(Double.doubleToRawLongBits(x)));
     return(this);
 }
 public override double Get(int i)
 {
     return(Double.longBitsToDouble(Bits.Swap(@unsafe.getLong(Ix(CheckIndex(i))))));
 }
示例#14
0
 public override ShortBuffer Put(int i, short x)
 {
     @unsafe.putShort(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
示例#15
0
 public override char Get(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(CheckIndex(i)))));
 }
示例#16
0
 public override FloatBuffer Put(int i, float x)
 {
     @unsafe.putInt(Ix(CheckIndex(i)), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
示例#17
0
 public override CharBuffer Put(char x)
 {
     @unsafe.putChar(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
示例#18
0
 public override LongBuffer Put(long x)
 {
     @unsafe.putLong(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
示例#19
0
 public override LongBuffer Put(int i, long x)
 {
     @unsafe.putLong(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
示例#20
0
 public override short Get()
 {
     return(Bits.Swap(@unsafe.getShort(Ix(NextGetIndex()))));
 }
示例#21
0
 public override short Get(int i)
 {
     return(Bits.Swap(@unsafe.getShort(Ix(CheckIndex(i)))));
 }
示例#22
0
 public override float Get(int i)
 {
     return(Float.intBitsToFloat(Bits.Swap(@unsafe.getInt(Ix(CheckIndex(i))))));
 }
示例#23
0
 public override FloatBuffer Put(float x)
 {
     @unsafe.putInt(Ix(NextPutIndex()), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
示例#24
0
 public override long Get(int i)
 {
     return(Bits.Swap(@unsafe.getLong(Ix(CheckIndex(i)))));
 }
示例#25
0
 public override char Get()
 {
     return(Bits.Swap(@unsafe.getChar(Ix(NextGetIndex()))));
 }
 public override double Get()
 {
     return(Double.longBitsToDouble(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex())))));
 }
示例#27
0
 internal override char GetUnchecked(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(i))));
 }
示例#28
0
 public override ShortBuffer Put(short x)
 {
     @unsafe.putShort(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
示例#29
0
 public override CharBuffer Put(int i, char x)
 {
     @unsafe.putChar(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
示例#30
0
 public override long Get()
 {
     return(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex()))));
 }