io.github.hapjava.server.impl.pairing.UpgradeResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hap Show documentation
Show all versions of hap Show documentation
Homekit Accessory Protocol for Java
package io.github.hapjava.server.impl.pairing;
import java.nio.ByteBuffer;
public class UpgradeResponse extends PairingResponse {
private final byte[] readKey;
private final byte[] writeKey;
UpgradeResponse(byte[] body, byte[] readKey, byte[] writeKey) {
super(body);
this.readKey = readKey;
this.writeKey = writeKey;
}
@Override
public boolean doUpgrade() {
return true;
}
public ByteBuffer getReadKey() {
return ByteBuffer.wrap(readKey);
}
public ByteBuffer getWriteKey() {
return ByteBuffer.wrap(writeKey);
}
}