Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 10
0
 public override float Get()
 {
     return(Float.intBitsToFloat(Bits.Swap(@unsafe.getInt(Ix(NextGetIndex())))));
 }
Ejemplo n.º 11
0
 public override DoubleBuffer Put(int i, double x)
 {
     @unsafe.putLong(Ix(CheckIndex(i)), Bits.Swap(Double.doubleToRawLongBits(x)));
     return(this);
 }
Ejemplo n.º 12
0
 public override DoubleBuffer Put(double x)
 {
     @unsafe.putLong(Ix(NextPutIndex()), Bits.Swap(Double.doubleToRawLongBits(x)));
     return(this);
 }
Ejemplo n.º 13
0
 public override double Get(int i)
 {
     return(Double.longBitsToDouble(Bits.Swap(@unsafe.getLong(Ix(CheckIndex(i))))));
 }
Ejemplo n.º 14
0
 public override ShortBuffer Put(int i, short x)
 {
     @unsafe.putShort(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 15
0
 public override char Get(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(CheckIndex(i)))));
 }
Ejemplo n.º 16
0
 public override FloatBuffer Put(int i, float x)
 {
     @unsafe.putInt(Ix(CheckIndex(i)), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
Ejemplo n.º 17
0
 public override CharBuffer Put(char x)
 {
     @unsafe.putChar(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 18
0
 public override LongBuffer Put(long x)
 {
     @unsafe.putLong(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 19
0
 public override LongBuffer Put(int i, long x)
 {
     @unsafe.putLong(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 20
0
 public override short Get()
 {
     return(Bits.Swap(@unsafe.getShort(Ix(NextGetIndex()))));
 }
Ejemplo n.º 21
0
 public override short Get(int i)
 {
     return(Bits.Swap(@unsafe.getShort(Ix(CheckIndex(i)))));
 }
Ejemplo n.º 22
0
 public override float Get(int i)
 {
     return(Float.intBitsToFloat(Bits.Swap(@unsafe.getInt(Ix(CheckIndex(i))))));
 }
Ejemplo n.º 23
0
 public override FloatBuffer Put(float x)
 {
     @unsafe.putInt(Ix(NextPutIndex()), Bits.Swap(Float.floatToRawIntBits(x)));
     return(this);
 }
Ejemplo n.º 24
0
 public override long Get(int i)
 {
     return(Bits.Swap(@unsafe.getLong(Ix(CheckIndex(i)))));
 }
Ejemplo n.º 25
0
 public override char Get()
 {
     return(Bits.Swap(@unsafe.getChar(Ix(NextGetIndex()))));
 }
Ejemplo n.º 26
0
 public override double Get()
 {
     return(Double.longBitsToDouble(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex())))));
 }
Ejemplo n.º 27
0
 internal override char GetUnchecked(int i)
 {
     return(Bits.Swap(@unsafe.getChar(Ix(i))));
 }
Ejemplo n.º 28
0
 public override ShortBuffer Put(short x)
 {
     @unsafe.putShort(Ix(NextPutIndex()), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 29
0
 public override CharBuffer Put(int i, char x)
 {
     @unsafe.putChar(Ix(CheckIndex(i)), Bits.Swap((x)));
     return(this);
 }
Ejemplo n.º 30
0
 public override long Get()
 {
     return(Bits.Swap(@unsafe.getLong(Ix(NextGetIndex()))));
 }