package ru.r2cloud.sdrserver;

import java.io.DataInputStream;
import java.io.IOException;

public class SdrServerResponse {

	private MessageHeader header;
	private ResponseStatus status;
	private int details;

	public SdrServerResponse() {
		// do nothing
	}

	public SdrServerResponse(DataInputStream dis) throws IOException {
		header = new MessageHeader(dis);
		status = ResponseStatus.values()[dis.readUnsignedByte()];
		details = dis.readUnsignedByte();
	}

	public MessageHeader getHeader() {
		return header;
	}

	public void setHeader(MessageHeader header) {
		this.header = header;
	}

	public ResponseStatus getStatus() {
		return status;
	}

	public void setStatus(ResponseStatus status) {
		this.status = status;
	}

	public int getDetails() {
		return details;
	}

	public void setDetails(int details) {
		this.details = details;
	}

	@Override
	public String toString() {
		return "SdrServerResponse [header=" + header + ", status=" + status + ", details=" + details + "]";
	}

}

@@ -85,16 +85,60 @@
 ption;%0A%0A
+import ru.r2cloud.jradio.util.StreamUtils;%0A%0A
 public c
@@ -235,19 +235,20 @@
 private 
-int
+long
  details
@@ -475,18 +475,26 @@
 tails = 
-di
+StreamUtil
 s.readUn
@@ -499,21 +499,23 @@
 Unsigned
-Byte(
+Int(dis
 );%0A%09%7D%0A%0A%09
@@ -787,19 +787,20 @@
 %09public 
-int
+long
  getDeta
@@ -857,11 +857,12 @@
 ils(
-int
+long
  det

fix sdr-server protocol