All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.hapjava.server.impl.pairing.UpgradeResponse Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy