Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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))))));
 }
 public override ShortBuffer Put(int i, short x)
 {
     @unsafe.putShort(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
 public override char Get(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(CheckIndex(i)))));
 }
Beispiel #16
0
 public override FloatBuffer Put(int i, float x)
 {
     @unsafe.putInt(Ix(CheckIndex(i)), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
 public override CharBuffer Put(char x)
 {
     @unsafe.putChar(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
Beispiel #18
0
 public override LongBuffer Put(long x)
 {
     @unsafe.putLong(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
Beispiel #19
0
 public override LongBuffer Put(int i, long x)
 {
     @unsafe.putLong(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
 public override short Get()
 {
     return(Bits.Swap(@unsafe.getShort(Ix(NextGetIndex()))));
 }
 public override short Get(int i)
 {
     return(Bits.Swap(@unsafe.getShort(Ix(CheckIndex(i)))));
 }
Beispiel #22
0
 public override float Get(int i)
 {
     return(Float.intBitsToFloat(Bits.Swap(@unsafe.getInt(Ix(CheckIndex(i))))));
 }
Beispiel #23
0
 public override FloatBuffer Put(float x)
 {
     @unsafe.putInt(Ix(NextPutIndex()), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
Beispiel #24
0
 public override long Get(int i)
 {
     return(Bits.Swap(@unsafe.getLong(Ix(CheckIndex(i)))));
 }
 public override char Get()
 {
     return(Bits.Swap(@unsafe.getChar(Ix(NextGetIndex()))));
 }
 public override double Get()
 {
     return(Double.longBitsToDouble(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex())))));
 }
 internal override char GetUnchecked(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(i))));
 }
 public override ShortBuffer Put(short x)
 {
     @unsafe.putShort(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
 public override CharBuffer Put(int i, char x)
 {
     @unsafe.putChar(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
Beispiel #30
0
 public override long Get()
 {
     return(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex()))));
 }