com.github.davidmoten.security.Classpath Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ppk Show documentation
Show all versions of ppk Show documentation
Public private key encryption
package com.github.davidmoten.security;
import java.io.IOException;
import com.google.common.io.ByteStreams;
public final class Classpath {
public static byte[] bytesFrom(Class> cls, String resource) {
try {
return ByteStreams.toByteArray(cls.getResourceAsStream(resource));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}