Ejemplo n.º 1
0
        public override void ReadFrom(IAdbSocket socket)
        {
            this.Command = socket.ReadSyncResponse();

            var reply = new byte[4];

            socket.Read(reply);

            if (!BitConverter.IsLittleEndian)
            {
                Array.Reverse(reply);
            }

            // The first 4 bytes contain the length of the data packet
            this.Size = BitConverter.ToInt32(reply, 0);
        }
Ejemplo n.º 2
0
        public override void ReadFrom(IAdbSocket socket)
        {
            this.Command = socket.ReadSyncResponse();

            byte[] statResult = new byte[12];
            socket.Read(statResult);

            if (!BitConverter.IsLittleEndian)
            {
                Array.Reverse(statResult, 0, 4);
                Array.Reverse(statResult, 4, 4);
                Array.Reverse(statResult, 8, 4);
            }

            this.FileMode = (UnixFileMode)BitConverter.ToInt32(statResult, 0);
            this.Size     = BitConverter.ToInt32(statResult, 4);
            this.Time     = DateTimeHelper.Epoch.AddSeconds(BitConverter.ToInt32(statResult, 8)).ToLocalTime();
        }
Ejemplo n.º 3
0
 public override void ReadFrom(IAdbSocket socket)
 {
     this.Command = socket.ReadSyncResponse();
 }