Example usage for io.netty.handler.ssl PemPrivateKey valueOf

List of usage examples for io.netty.handler.ssl PemPrivateKey valueOf

Introduction

In this page you can find the example usage for io.netty.handler.ssl PemPrivateKey valueOf.

Prototype

public static PemPrivateKey valueOf(ByteBuf key) 

Source Link

Document

Creates a PemPrivateKey from raw ByteBuf .

Usage

From source file:org.graylog2.plugin.inputs.transports.util.KeyUtil.java

License:Open Source License

public static PrivateKey readPrivateKey(Path path) throws IOException {
    final byte[] bytes = Files.readAllBytes(path);
    return PemPrivateKey.valueOf(bytes);
}