Skip to content

在获取StrorageInfo 时候报错! StroageInfo.BYTE_SIZE 这个不一致??为什么是600呢? #1

@lanfen100

Description

@lanfen100

@OverRide
public Result<List> exec(Socket socket) throws IOException {
request(socket.getOutputStream());
Response response = response(socket.getInputStream());
if(response.isSuccess()){
byte[] data = response.getData();
int dataLength = data.length;
if(dataLength%StorageInfo.BYTE_SIZE!=0){
throw new IOException("recv body length: " + data.length + " is not correct");
}
List storageInfos = new ArrayList();
int offset = 0;
while(offset<dataLength){
StorageInfo storageInfo = new StorageInfo(data,offset);
storageInfos.add(storageInfo);
offset += StorageInfo.BYTE_SIZE;
}
return new Result<List>(response.getCode(), storageInfos);
}else{
return new Result<List>(response.getCode(), "Error");
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions