id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
22,000
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChannelConfiguration.java
ChannelConfiguration.setChannelConfiguration
public void setChannelConfiguration(byte[] channelConfigurationAsBytes) throws InvalidArgumentException { if (channelConfigurationAsBytes == null) { throw new InvalidArgumentException("ChannelConfiguration channelConfigurationAsBytes must be non-null"); } logger.trace("Creating setCh...
java
public void setChannelConfiguration(byte[] channelConfigurationAsBytes) throws InvalidArgumentException { if (channelConfigurationAsBytes == null) { throw new InvalidArgumentException("ChannelConfiguration channelConfigurationAsBytes must be non-null"); } logger.trace("Creating setCh...
[ "public", "void", "setChannelConfiguration", "(", "byte", "[", "]", "channelConfigurationAsBytes", ")", "throws", "InvalidArgumentException", "{", "if", "(", "channelConfigurationAsBytes", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Chann...
sets the ChannelConfiguration from a byte array @param channelConfigurationAsBytes the byte array containing the serialized channel configuration
[ "sets", "the", "ChannelConfiguration", "from", "a", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChannelConfiguration.java#L81-L87
22,001
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.getRand
public static RAND getRand() { // construct a secure seed int seedLength = IdemixUtils.FIELD_BYTES; SecureRandom random = new SecureRandom(); byte[] seed = random.generateSeed(seedLength); // create a new amcl.RAND and initialize it with the generated seed RAND rng = new...
java
public static RAND getRand() { // construct a secure seed int seedLength = IdemixUtils.FIELD_BYTES; SecureRandom random = new SecureRandom(); byte[] seed = random.generateSeed(seedLength); // create a new amcl.RAND and initialize it with the generated seed RAND rng = new...
[ "public", "static", "RAND", "getRand", "(", ")", "{", "// construct a secure seed", "int", "seedLength", "=", "IdemixUtils", ".", "FIELD_BYTES", ";", "SecureRandom", "random", "=", "new", "SecureRandom", "(", ")", ";", "byte", "[", "]", "seed", "=", "random", ...
Returns a random number generator, amcl.RAND, initialized with a fresh seed. @return a random number generator
[ "Returns", "a", "random", "number", "generator", "amcl", ".", "RAND", "initialized", "with", "a", "fresh", "seed", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L66-L78
22,002
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.hashModOrder
public static BIG hashModOrder(byte[] data) { HASH256 hash = new HASH256(); for (byte b : data) { hash.process(b); } byte[] hasheddata = hash.hash(); BIG ret = BIG.fromBytes(hasheddata); ret.mod(IdemixUtils.GROUP_ORDER); return ret; }
java
public static BIG hashModOrder(byte[] data) { HASH256 hash = new HASH256(); for (byte b : data) { hash.process(b); } byte[] hasheddata = hash.hash(); BIG ret = BIG.fromBytes(hasheddata); ret.mod(IdemixUtils.GROUP_ORDER); return ret; }
[ "public", "static", "BIG", "hashModOrder", "(", "byte", "[", "]", "data", ")", "{", "HASH256", "hash", "=", "new", "HASH256", "(", ")", ";", "for", "(", "byte", "b", ":", "data", ")", "{", "hash", ".", "process", "(", "b", ")", ";", "}", "byte", ...
hashModOrder hashes bytes to an amcl.BIG in 0, ..., GROUP_ORDER @param data the data to be hashed @return a BIG in 0, ..., GROUP_ORDER-1 that is the hash of the data
[ "hashModOrder", "hashes", "bytes", "to", "an", "amcl", ".", "BIG", "in", "0", "...", "GROUP_ORDER" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L97-L109
22,003
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.bigToBytes
public static byte[] bigToBytes(BIG big) { byte[] ret = new byte[IdemixUtils.FIELD_BYTES]; big.toBytes(ret); return ret; }
java
public static byte[] bigToBytes(BIG big) { byte[] ret = new byte[IdemixUtils.FIELD_BYTES]; big.toBytes(ret); return ret; }
[ "public", "static", "byte", "[", "]", "bigToBytes", "(", "BIG", "big", ")", "{", "byte", "[", "]", "ret", "=", "new", "byte", "[", "IdemixUtils", ".", "FIELD_BYTES", "]", ";", "big", ".", "toBytes", "(", "ret", ")", ";", "return", "ret", ";", "}" ]
bigToBytes turns a BIG into a byte array @param big the BIG to turn into bytes @return a byte array representation of the BIG
[ "bigToBytes", "turns", "a", "BIG", "into", "a", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L117-L121
22,004
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.ecpToBytes
static byte[] ecpToBytes(ECP e) { byte[] ret = new byte[2 * FIELD_BYTES + 1]; e.toBytes(ret, false); return ret; }
java
static byte[] ecpToBytes(ECP e) { byte[] ret = new byte[2 * FIELD_BYTES + 1]; e.toBytes(ret, false); return ret; }
[ "static", "byte", "[", "]", "ecpToBytes", "(", "ECP", "e", ")", "{", "byte", "[", "]", "ret", "=", "new", "byte", "[", "2", "*", "FIELD_BYTES", "+", "1", "]", ";", "e", ".", "toBytes", "(", "ret", ",", "false", ")", ";", "return", "ret", ";", ...
ecpToBytes turns an ECP into a byte array @param e the ECP to turn into bytes @return a byte array representation of the ECP
[ "ecpToBytes", "turns", "an", "ECP", "into", "a", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L129-L133
22,005
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.append
static byte[] append(byte[] data, byte[] toAppend) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { stream.write(data); stream.write(toAppend); } catch (IOException e) { e.printStackTrace(); } return stream.toByteArray(); ...
java
static byte[] append(byte[] data, byte[] toAppend) { ByteArrayOutputStream stream = new ByteArrayOutputStream(); try { stream.write(data); stream.write(toAppend); } catch (IOException e) { e.printStackTrace(); } return stream.toByteArray(); ...
[ "static", "byte", "[", "]", "append", "(", "byte", "[", "]", "data", ",", "byte", "[", "]", "toAppend", ")", "{", "ByteArrayOutputStream", "stream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "try", "{", "stream", ".", "write", "(", "data", ")...
append appends a byte array to an existing byte array @param data the data to which we want to append @param toAppend the data to be appended @return a new byte[] of data + toAppend
[ "append", "appends", "a", "byte", "array", "to", "an", "existing", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L154-L164
22,006
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.append
static byte[] append(byte[] data, boolean[] toAppend) { byte[] toAppendBytes = new byte[toAppend.length]; for (int i = 0; i < toAppend.length; i++) { toAppendBytes[i] = toAppend[i] ? (byte) 1 : (byte) 0; } return append(data, toAppendBytes); }
java
static byte[] append(byte[] data, boolean[] toAppend) { byte[] toAppendBytes = new byte[toAppend.length]; for (int i = 0; i < toAppend.length; i++) { toAppendBytes[i] = toAppend[i] ? (byte) 1 : (byte) 0; } return append(data, toAppendBytes); }
[ "static", "byte", "[", "]", "append", "(", "byte", "[", "]", "data", ",", "boolean", "[", "]", "toAppend", ")", "{", "byte", "[", "]", "toAppendBytes", "=", "new", "byte", "[", "toAppend", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0"...
append appends a boolean array to an existing byte array @param data the data to which we want to append @param toAppend the data to be appended @return a new byte[] of data + toAppend
[ "append", "appends", "a", "boolean", "array", "to", "an", "existing", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L172-L178
22,007
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.transformFromProto
static ECP transformFromProto(Idemix.ECP w) { byte[] valuex = w.getX().toByteArray(); byte[] valuey = w.getY().toByteArray(); return new ECP(BIG.fromBytes(valuex), BIG.fromBytes(valuey)); }
java
static ECP transformFromProto(Idemix.ECP w) { byte[] valuex = w.getX().toByteArray(); byte[] valuey = w.getY().toByteArray(); return new ECP(BIG.fromBytes(valuex), BIG.fromBytes(valuey)); }
[ "static", "ECP", "transformFromProto", "(", "Idemix", ".", "ECP", "w", ")", "{", "byte", "[", "]", "valuex", "=", "w", ".", "getX", "(", ")", ".", "toByteArray", "(", ")", ";", "byte", "[", "]", "valuey", "=", "w", ".", "getY", "(", ")", ".", "...
Returns an amcl.BN256.ECP on input of an ECP protobuf object. @param w a protobuf object representing an ECP @return a ECP created from the protobuf object
[ "Returns", "an", "amcl", ".", "BN256", ".", "ECP", "on", "input", "of", "an", "ECP", "protobuf", "object", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L186-L190
22,008
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.transformFromProto
static ECP2 transformFromProto(Idemix.ECP2 w) { byte[] valuexa = w.getXa().toByteArray(); byte[] valuexb = w.getXb().toByteArray(); byte[] valueya = w.getYa().toByteArray(); byte[] valueyb = w.getYb().toByteArray(); FP2 valuex = new FP2(BIG.fromBytes(valuexa), BIG.fromBytes(value...
java
static ECP2 transformFromProto(Idemix.ECP2 w) { byte[] valuexa = w.getXa().toByteArray(); byte[] valuexb = w.getXb().toByteArray(); byte[] valueya = w.getYa().toByteArray(); byte[] valueyb = w.getYb().toByteArray(); FP2 valuex = new FP2(BIG.fromBytes(valuexa), BIG.fromBytes(value...
[ "static", "ECP2", "transformFromProto", "(", "Idemix", ".", "ECP2", "w", ")", "{", "byte", "[", "]", "valuexa", "=", "w", ".", "getXa", "(", ")", ".", "toByteArray", "(", ")", ";", "byte", "[", "]", "valuexb", "=", "w", ".", "getXb", "(", ")", "....
Returns an amcl.BN256.ECP2 on input of an ECP2 protobuf object. @param w a protobuf object representing an ECP2 @return a ECP2 created from the protobuf object
[ "Returns", "an", "amcl", ".", "BN256", ".", "ECP2", "on", "input", "of", "an", "ECP2", "protobuf", "object", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L198-L206
22,009
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.transformToProto
static Idemix.ECP2 transformToProto(ECP2 w) { byte[] valueXA = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueXB = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueYA = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueYB = new byte[IdemixUtils.FIELD_BYTES]; w.getX().getA().toBytes(...
java
static Idemix.ECP2 transformToProto(ECP2 w) { byte[] valueXA = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueXB = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueYA = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueYB = new byte[IdemixUtils.FIELD_BYTES]; w.getX().getA().toBytes(...
[ "static", "Idemix", ".", "ECP2", "transformToProto", "(", "ECP2", "w", ")", "{", "byte", "[", "]", "valueXA", "=", "new", "byte", "[", "IdemixUtils", ".", "FIELD_BYTES", "]", ";", "byte", "[", "]", "valueXB", "=", "new", "byte", "[", "IdemixUtils", "."...
Converts an amcl.BN256.ECP2 into an ECP2 protobuf object. @param w an ECP2 to be transformed into a protobuf object @return a protobuf representation of the ECP2
[ "Converts", "an", "amcl", ".", "BN256", ".", "ECP2", "into", "an", "ECP2", "protobuf", "object", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L214-L232
22,010
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.transformToProto
static Idemix.ECP transformToProto(ECP w) { byte[] valueX = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueY = new byte[IdemixUtils.FIELD_BYTES]; w.getX().toBytes(valueX); w.getY().toBytes(valueY); return Idemix.ECP.newBuilder().setX(ByteString.copyFrom(valueX)).setY(ByteString...
java
static Idemix.ECP transformToProto(ECP w) { byte[] valueX = new byte[IdemixUtils.FIELD_BYTES]; byte[] valueY = new byte[IdemixUtils.FIELD_BYTES]; w.getX().toBytes(valueX); w.getY().toBytes(valueY); return Idemix.ECP.newBuilder().setX(ByteString.copyFrom(valueX)).setY(ByteString...
[ "static", "Idemix", ".", "ECP", "transformToProto", "(", "ECP", "w", ")", "{", "byte", "[", "]", "valueX", "=", "new", "byte", "[", "IdemixUtils", ".", "FIELD_BYTES", "]", ";", "byte", "[", "]", "valueY", "=", "new", "byte", "[", "IdemixUtils", ".", ...
Converts an amcl.BN256.ECP into an ECP protobuf object. @param w an ECP to be transformed into a protobuf object @return a protobuf representation of the ECP
[ "Converts", "an", "amcl", ".", "BN256", ".", "ECP", "into", "an", "ECP", "protobuf", "object", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L240-L248
22,011
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.modAdd
static BIG modAdd(BIG a, BIG b, BIG m) { BIG c = a.plus(b); c.mod(m); return c; }
java
static BIG modAdd(BIG a, BIG b, BIG m) { BIG c = a.plus(b); c.mod(m); return c; }
[ "static", "BIG", "modAdd", "(", "BIG", "a", ",", "BIG", "b", ",", "BIG", "m", ")", "{", "BIG", "c", "=", "a", ".", "plus", "(", "b", ")", ";", "c", ".", "mod", "(", "m", ")", ";", "return", "c", ";", "}" ]
Takes input BIGs a, b, m and returns a+b modulo m @param a the first BIG to add @param b the second BIG to add @param m the modulus @return Returns a+b (mod m)
[ "Takes", "input", "BIGs", "a", "b", "m", "and", "returns", "a", "+", "b", "modulo", "m" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L258-L262
22,012
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java
IdemixUtils.modSub
static BIG modSub(BIG a, BIG b, BIG m) { return modAdd(a, BIG.modneg(b, m), m); }
java
static BIG modSub(BIG a, BIG b, BIG m) { return modAdd(a, BIG.modneg(b, m), m); }
[ "static", "BIG", "modSub", "(", "BIG", "a", ",", "BIG", "b", ",", "BIG", "m", ")", "{", "return", "modAdd", "(", "a", ",", "BIG", ".", "modneg", "(", "b", ",", "m", ")", ",", "m", ")", ";", "}" ]
Modsub takes input BIGs a, b, m and returns a-b modulo m @param a the minuend of the modular subtraction @param b the subtrahend of the modular subtraction @param m the modulus @return returns a-b (mod m)
[ "Modsub", "takes", "input", "BIGs", "a", "b", "m", "and", "returns", "a", "-", "b", "modulo", "m" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixUtils.java#L272-L274
22,013
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java
ChaincodeEndorsementPolicy.fromYamlFile
public void fromYamlFile(File yamlPolicyFile) throws IOException, ChaincodeEndorsementPolicyParseException { final Yaml yaml = new Yaml(); final Map<?, ?> load = (Map<?, ?>) yaml.load(new FileInputStream(yamlPolicyFile)); Map<?, ?> mp = (Map<?, ?>) load.get("policy"); if (null == mp) {...
java
public void fromYamlFile(File yamlPolicyFile) throws IOException, ChaincodeEndorsementPolicyParseException { final Yaml yaml = new Yaml(); final Map<?, ?> load = (Map<?, ?>) yaml.load(new FileInputStream(yamlPolicyFile)); Map<?, ?> mp = (Map<?, ?>) load.get("policy"); if (null == mp) {...
[ "public", "void", "fromYamlFile", "(", "File", "yamlPolicyFile", ")", "throws", "IOException", ",", "ChaincodeEndorsementPolicyParseException", "{", "final", "Yaml", "yaml", "=", "new", "Yaml", "(", ")", ";", "final", "Map", "<", "?", ",", "?", ">", "load", ...
From a yaml file @param yamlPolicyFile File location for the chaincode endorsement policy specification. @throws IOException @throws ChaincodeEndorsementPolicyParseException @deprecated use {@link #fromYamlFile(Path)}
[ "From", "a", "yaml", "file" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java#L239-L258
22,014
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java
ChaincodeEndorsementPolicy.fromBytes
public static ChaincodeEndorsementPolicy fromBytes(byte[] policyAsBytes) { ChaincodeEndorsementPolicy ret = new ChaincodeEndorsementPolicy(); ret.policyBytes = new byte[policyAsBytes.length]; System.arraycopy(policyAsBytes, 0, ret.policyBytes, 0, policyAsBytes.length); return ret; ...
java
public static ChaincodeEndorsementPolicy fromBytes(byte[] policyAsBytes) { ChaincodeEndorsementPolicy ret = new ChaincodeEndorsementPolicy(); ret.policyBytes = new byte[policyAsBytes.length]; System.arraycopy(policyAsBytes, 0, ret.policyBytes, 0, policyAsBytes.length); return ret; ...
[ "public", "static", "ChaincodeEndorsementPolicy", "fromBytes", "(", "byte", "[", "]", "policyAsBytes", ")", "{", "ChaincodeEndorsementPolicy", "ret", "=", "new", "ChaincodeEndorsementPolicy", "(", ")", ";", "ret", ".", "policyBytes", "=", "new", "byte", "[", "poli...
sets the ChaincodeEndorsementPolicy from a byte array @param policyAsBytes the byte array containing the serialized policy
[ "sets", "the", "ChaincodeEndorsementPolicy", "from", "a", "byte", "array" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEndorsementPolicy.java#L301-L308
22,015
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.read
public int read(User registrar) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readAffURL = ""; try { readAffURL = HFCA_AFFILIATION + "/" + name; ...
java
public int read(User registrar) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readAffURL = ""; try { readAffURL = HFCA_AFFILIATION + "/" + name; ...
[ "public", "int", "read", "(", "User", "registrar", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "registrar", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Registrar should be a valid member\"", "...
gets a specific affiliation @param registrar The identity of the registrar @return Returns response @throws AffiliationException if getting an affiliation fails. @throws InvalidArgumentException
[ "gets", "a", "specific", "affiliation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L194-L224
22,016
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.create
public HFCAAffiliationResp create(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String createURL = ""; try { createURL = ...
java
public HFCAAffiliationResp create(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String createURL = ""; try { createURL = ...
[ "public", "HFCAAffiliationResp", "create", "(", "User", "registrar", ",", "boolean", "force", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "registrar", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "("...
create an affiliation @param registrar The identity of the registrar (i.e. who is performing the registration). @param force Forces the creation of parent affiliations @return Response of request @throws AffiliationException if adding an affiliation fails. @throws InvalidArgumentException
[ "create", "an", "affiliation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L248-L277
22,017
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.update
public HFCAAffiliationResp update(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (this.deleted) { throw new AffiliationException("Affiliation has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Regi...
java
public HFCAAffiliationResp update(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (this.deleted) { throw new AffiliationException("Affiliation has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Regi...
[ "public", "HFCAAffiliationResp", "update", "(", "User", "registrar", ",", "boolean", "force", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "this", ".", "deleted", ")", "{", "throw", "new", "AffiliationException", "(", "\"...
update an affiliation @param registrar The identity of the registrar (i.e. who is performing the registration). @param force Forces updating of child affiliations @return Response of request @throws AffiliationException If updating an affiliation fails @throws InvalidArgumentException
[ "update", "an", "affiliation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L301-L340
22,018
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.delete
public HFCAAffiliationResp delete(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (this.deleted) { throw new AffiliationException("Affiliation has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Regi...
java
public HFCAAffiliationResp delete(User registrar, boolean force) throws AffiliationException, InvalidArgumentException { if (this.deleted) { throw new AffiliationException("Affiliation has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Regi...
[ "public", "HFCAAffiliationResp", "delete", "(", "User", "registrar", ",", "boolean", "force", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "this", ".", "deleted", ")", "{", "throw", "new", "AffiliationException", "(", "\"...
delete an affiliation @param registrar The identity of the registrar (i.e. who is performing the registration). @param force Forces the deletion of affiliation @return Response of request @throws AffiliationException if deleting an affiliation fails. @throws InvalidArgumentException
[ "delete", "an", "affiliation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L364-L396
22,019
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.affToJsonObject
private JsonObject affToJsonObject() { JsonObjectBuilder ob = Json.createObjectBuilder(); if (client.getCAName() != null) { ob.add(HFCAClient.FABRIC_CA_REQPROP, client.getCAName()); } if (this.updateName != null) { ob.add("name", updateName); this.upda...
java
private JsonObject affToJsonObject() { JsonObjectBuilder ob = Json.createObjectBuilder(); if (client.getCAName() != null) { ob.add(HFCAClient.FABRIC_CA_REQPROP, client.getCAName()); } if (this.updateName != null) { ob.add("name", updateName); this.upda...
[ "private", "JsonObject", "affToJsonObject", "(", ")", "{", "JsonObjectBuilder", "ob", "=", "Json", ".", "createObjectBuilder", "(", ")", ";", "if", "(", "client", ".", "getCAName", "(", ")", "!=", "null", ")", "{", "ob", ".", "add", "(", "HFCAClient", "....
Convert the affiliation request to a JSON object
[ "Convert", "the", "affiliation", "request", "to", "a", "JSON", "object" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L498-L511
22,020
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java
HFCAAffiliation.validateAffiliationNames
void validateAffiliationNames(String name) throws InvalidArgumentException { checkFormat(name); if (name.startsWith(".")) { throw new InvalidArgumentException("Affiliation name cannot start with a dot '.'"); } if (name.endsWith(".")) { throw new InvalidArgumentExc...
java
void validateAffiliationNames(String name) throws InvalidArgumentException { checkFormat(name); if (name.startsWith(".")) { throw new InvalidArgumentException("Affiliation name cannot start with a dot '.'"); } if (name.endsWith(".")) { throw new InvalidArgumentExc...
[ "void", "validateAffiliationNames", "(", "String", "name", ")", "throws", "InvalidArgumentException", "{", "checkFormat", "(", "name", ")", ";", "if", "(", "name", ".", "startsWith", "(", "\".\"", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", ...
Validate affiliation name for proper formatting @param name the string to test. @throws InvalidArgumentException
[ "Validate", "affiliation", "name", "for", "proper", "formatting" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAAffiliation.java#L519-L532
22,021
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/HLSDKJCryptoSuiteFactory.java
HLSDKJCryptoSuiteFactory.getDefault
static final synchronized CryptoSuiteFactory getDefault() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { if (null == theFACTORY) { String cf = config.getDefaultCryptoSuiteFactory(); if (null == cf || cf....
java
static final synchronized CryptoSuiteFactory getDefault() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { if (null == theFACTORY) { String cf = config.getDefaultCryptoSuiteFactory(); if (null == cf || cf....
[ "static", "final", "synchronized", "CryptoSuiteFactory", "getDefault", "(", ")", "throws", "ClassNotFoundException", ",", "IllegalAccessException", ",", "InstantiationException", ",", "NoSuchMethodException", ",", "InvocationTargetException", "{", "if", "(", "null", "==", ...
one and only factory.
[ "one", "and", "only", "factory", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/HLSDKJCryptoSuiteFactory.java#L82-L117
22,022
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixCredential.java
IdemixCredential.verify
public boolean verify(BIG sk, IdemixIssuerPublicKey ipk) { if (ipk == null || Attrs.length != ipk.getAttributeNames().length) { return false; } for (byte[] attr : Attrs) { if (attr == null) { return false; } } ECP bPrime = new ...
java
public boolean verify(BIG sk, IdemixIssuerPublicKey ipk) { if (ipk == null || Attrs.length != ipk.getAttributeNames().length) { return false; } for (byte[] attr : Attrs) { if (attr == null) { return false; } } ECP bPrime = new ...
[ "public", "boolean", "verify", "(", "BIG", "sk", ",", "IdemixIssuerPublicKey", "ipk", ")", "{", "if", "(", "ipk", "==", "null", "||", "Attrs", ".", "length", "!=", "ipk", ".", "getAttributeNames", "(", ")", ".", "length", ")", "{", "return", "false", "...
verify cryptographically verifies the credential @param sk the secret key of the user @param ipk the public key of the issuer @return true iff valid
[ "verify", "cryptographically", "verifies", "the", "credential" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixCredential.java#L132-L159
22,023
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/BlockInfo.java
BlockInfo.getTransactionCount
public int getTransactionCount() { if (isFiltered()) { int ltransactionCount = transactionCount; if (ltransactionCount < 0) { ltransactionCount = 0; for (int i = filteredBlock.getFilteredTransactionsCount() - 1; i >= 0; --i) { Filtere...
java
public int getTransactionCount() { if (isFiltered()) { int ltransactionCount = transactionCount; if (ltransactionCount < 0) { ltransactionCount = 0; for (int i = filteredBlock.getFilteredTransactionsCount() - 1; i >= 0; --i) { Filtere...
[ "public", "int", "getTransactionCount", "(", ")", "{", "if", "(", "isFiltered", "(", ")", ")", "{", "int", "ltransactionCount", "=", "transactionCount", ";", "if", "(", "ltransactionCount", "<", "0", ")", "{", "ltransactionCount", "=", "0", ";", "for", "("...
Number of endorser transaction found in the block. @return Number of endorser transaction found in the block.
[ "Number", "of", "endorser", "transaction", "found", "in", "the", "block", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/BlockInfo.java#L153-L189
22,024
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/BlockInfo.java
BlockInfo.getEnvelopeInfo
public EnvelopeInfo getEnvelopeInfo(int envelopeIndex) throws InvalidProtocolBufferException { try { EnvelopeInfo ret; if (isFiltered()) { switch (filteredBlock.getFilteredTransactions(envelopeIndex).getType().getNumber()) { case Common.HeaderType....
java
public EnvelopeInfo getEnvelopeInfo(int envelopeIndex) throws InvalidProtocolBufferException { try { EnvelopeInfo ret; if (isFiltered()) { switch (filteredBlock.getFilteredTransactions(envelopeIndex).getType().getNumber()) { case Common.HeaderType....
[ "public", "EnvelopeInfo", "getEnvelopeInfo", "(", "int", "envelopeIndex", ")", "throws", "InvalidProtocolBufferException", "{", "try", "{", "EnvelopeInfo", "ret", ";", "if", "(", "isFiltered", "(", ")", ")", "{", "switch", "(", "filteredBlock", ".", "getFilteredTr...
Return a specific envelope in the block by it's index. @param envelopeIndex the index into list. @return envelopeIndex the index @throws InvalidProtocolBufferException
[ "Return", "a", "specific", "envelope", "in", "the", "block", "by", "it", "s", "index", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/BlockInfo.java#L371-L409
22,025
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Orderer.java
Orderer.sendTransaction
Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Orderer.sendTransaction %s", toString())); OrdererClient localOrdererClient ...
java
Ab.BroadcastResponse sendTransaction(Common.Envelope transaction) throws Exception { if (shutdown) { throw new TransactionException(format("Orderer %s was shutdown.", name)); } logger.debug(format("Orderer.sendTransaction %s", toString())); OrdererClient localOrdererClient ...
[ "Ab", ".", "BroadcastResponse", "sendTransaction", "(", "Common", ".", "Envelope", "transaction", ")", "throws", "Exception", "{", "if", "(", "shutdown", ")", "{", "throw", "new", "TransactionException", "(", "format", "(", "\"Orderer %s was shutdown.\"", ",", "na...
Send transaction to Order @param transaction transaction to be sent
[ "Send", "transaction", "to", "Order" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Orderer.java#L151-L168
22,026
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromYamlFile
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, false); }
java
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, false); }
[ "public", "static", "ChaincodeCollectionConfiguration", "fromYamlFile", "(", "File", "configFile", ")", "throws", "InvalidArgumentException", ",", "IOException", ",", "ChaincodeCollectionConfigurationException", "{", "return", "fromFile", "(", "configFile", ",", "false", ")...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a YAML file. @param configFile The file containing the network configuration @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException @throws IOException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "a", "YAML", "file", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L88-L90
22,027
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromJsonFile
public static ChaincodeCollectionConfiguration fromJsonFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, true); }
java
public static ChaincodeCollectionConfiguration fromJsonFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, true); }
[ "public", "static", "ChaincodeCollectionConfiguration", "fromJsonFile", "(", "File", "configFile", ")", "throws", "InvalidArgumentException", ",", "IOException", ",", "ChaincodeCollectionConfigurationException", "{", "return", "fromFile", "(", "configFile", ",", "true", ")"...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON file. @param configFile The file containing the network configuration @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException @throws IOException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "a", "JSON", "file", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L100-L102
22,028
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromYamlStream
public static ChaincodeCollectionConfiguration fromYamlStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { logger.trace("ChaincodeCollectionConfiguration.fromYamlStream..."); // Sanity check if (configStream == null) { throw...
java
public static ChaincodeCollectionConfiguration fromYamlStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { logger.trace("ChaincodeCollectionConfiguration.fromYamlStream..."); // Sanity check if (configStream == null) { throw...
[ "public", "static", "ChaincodeCollectionConfiguration", "fromYamlStream", "(", "InputStream", "configStream", ")", "throws", "InvalidArgumentException", ",", "ChaincodeCollectionConfigurationException", "{", "logger", ".", "trace", "(", "\"ChaincodeCollectionConfiguration.fromYamlS...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in YAML format @param configStream A stream opened on a YAML document containing network configuration details @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "YAML", "format" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L111-L129
22,029
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromJsonStream
public static ChaincodeCollectionConfiguration fromJsonStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { logger.trace("ChaincodeCollectionConfiguration.fromJsonStream..."); // Sanity check if (configStream == null) { throw...
java
public static ChaincodeCollectionConfiguration fromJsonStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { logger.trace("ChaincodeCollectionConfiguration.fromJsonStream..."); // Sanity check if (configStream == null) { throw...
[ "public", "static", "ChaincodeCollectionConfiguration", "fromJsonStream", "(", "InputStream", "configStream", ")", "throws", "InvalidArgumentException", ",", "ChaincodeCollectionConfigurationException", "{", "logger", ".", "trace", "(", "\"ChaincodeCollectionConfiguration.fromJsonS...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in JSON format @param configStream A stream opened on a JSON document containing network configuration details @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "JSON", "format" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L138-L154
22,030
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromJsonObject
public static ChaincodeCollectionConfiguration fromJsonObject(JsonArray jsonConfig) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { // Sanity check if (jsonConfig == null) { throw new InvalidArgumentException("jsonConfig must be specified"); } i...
java
public static ChaincodeCollectionConfiguration fromJsonObject(JsonArray jsonConfig) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { // Sanity check if (jsonConfig == null) { throw new InvalidArgumentException("jsonConfig must be specified"); } i...
[ "public", "static", "ChaincodeCollectionConfiguration", "fromJsonObject", "(", "JsonArray", "jsonConfig", ")", "throws", "InvalidArgumentException", ",", "ChaincodeCollectionConfigurationException", "{", "// Sanity check", "if", "(", "jsonConfig", "==", "null", ")", "{", "t...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON object @param jsonConfig JSON object containing network configuration details @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "a", "JSON", "object" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L163-L175
22,031
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromFile
private static ChaincodeCollectionConfiguration fromFile(File configFile, boolean isJson) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { // Sanity check if (configFile == null) { throw new InvalidArgumentException("configFile must be specified"); ...
java
private static ChaincodeCollectionConfiguration fromFile(File configFile, boolean isJson) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { // Sanity check if (configFile == null) { throw new InvalidArgumentException("configFile must be specified"); ...
[ "private", "static", "ChaincodeCollectionConfiguration", "fromFile", "(", "File", "configFile", ",", "boolean", "isJson", ")", "throws", "InvalidArgumentException", ",", "IOException", ",", "ChaincodeCollectionConfigurationException", "{", "// Sanity check", "if", "(", "con...
Loads a ChaincodeCollectionConfiguration object from a Json or Yaml file
[ "Loads", "a", "ChaincodeCollectionConfiguration", "object", "from", "a", "Json", "or", "Yaml", "file" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L193-L209
22,032
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.load
private static ChaincodeCollectionConfiguration load(JsonArray jsonConfig) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { // Sanity check if (jsonConfig == null) { throw new InvalidArgumentException("jsonConfig must be specified"); } return new...
java
private static ChaincodeCollectionConfiguration load(JsonArray jsonConfig) throws InvalidArgumentException, ChaincodeCollectionConfigurationException { // Sanity check if (jsonConfig == null) { throw new InvalidArgumentException("jsonConfig must be specified"); } return new...
[ "private", "static", "ChaincodeCollectionConfiguration", "load", "(", "JsonArray", "jsonConfig", ")", "throws", "InvalidArgumentException", ",", "ChaincodeCollectionConfigurationException", "{", "// Sanity check", "if", "(", "jsonConfig", "==", "null", ")", "{", "throw", ...
Returns a new ChaincodeCollectionConfiguration instance and populates it from the specified JSON object @param jsonConfig The JSON object containing the config details @return A populated ChaincodeCollectionConfiguration instance @throws InvalidArgumentException
[ "Returns", "a", "new", "ChaincodeCollectionConfiguration", "instance", "and", "populates", "it", "from", "the", "specified", "JSON", "object" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L218-L226
22,033
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryChaincodeDefinitionProposalResponse.java
LifecycleQueryChaincodeDefinitionProposalResponse.getValidationParameter
public byte[] getValidationParameter() throws ProposalException { ByteString payloadBytes = parsePayload().getValidationParameter(); if (null == payloadBytes) { return null; } return payloadBytes.toByteArray(); }
java
public byte[] getValidationParameter() throws ProposalException { ByteString payloadBytes = parsePayload().getValidationParameter(); if (null == payloadBytes) { return null; } return payloadBytes.toByteArray(); }
[ "public", "byte", "[", "]", "getValidationParameter", "(", ")", "throws", "ProposalException", "{", "ByteString", "payloadBytes", "=", "parsePayload", "(", ")", ".", "getValidationParameter", "(", ")", ";", "if", "(", "null", "==", "payloadBytes", ")", "{", "r...
The validation parameter bytes that were set when the chaincode was defined. @return validation parameter. @throws ProposalException
[ "The", "validation", "parameter", "bytes", "that", "were", "set", "when", "the", "chaincode", "was", "defined", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryChaincodeDefinitionProposalResponse.java#L75-L82
22,034
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryChaincodeDefinitionProposalResponse.java
LifecycleQueryChaincodeDefinitionProposalResponse.getChaincodeCollectionConfiguration
public ChaincodeCollectionConfiguration getChaincodeCollectionConfiguration() throws ProposalException { Collection.CollectionConfigPackage collections = parsePayload().getCollections(); if (null == collections || !parsePayload().hasCollections()) { return null; } try { ...
java
public ChaincodeCollectionConfiguration getChaincodeCollectionConfiguration() throws ProposalException { Collection.CollectionConfigPackage collections = parsePayload().getCollections(); if (null == collections || !parsePayload().hasCollections()) { return null; } try { ...
[ "public", "ChaincodeCollectionConfiguration", "getChaincodeCollectionConfiguration", "(", ")", "throws", "ProposalException", "{", "Collection", ".", "CollectionConfigPackage", "collections", "=", "parsePayload", "(", ")", ".", "getCollections", "(", ")", ";", "if", "(", ...
The collection configuration this chaincode was defined. @return chaincode collection @throws ProposalException
[ "The", "collection", "configuration", "this", "chaincode", "was", "defined", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryChaincodeDefinitionProposalResponse.java#L120-L131
22,035
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixPseudonymSignature.java
IdemixPseudonymSignature.verify
public boolean verify(ECP nym, IdemixIssuerPublicKey ipk, byte[] msg) { if (nym == null || ipk == null || msg == null) { return false; } ECP t = ipk.getHsk().mul2(proofSSk, ipk.getHRand(), proofSRNym); t.sub(nym.mul(proofC)); // create array for proof data that will...
java
public boolean verify(ECP nym, IdemixIssuerPublicKey ipk, byte[] msg) { if (nym == null || ipk == null || msg == null) { return false; } ECP t = ipk.getHsk().mul2(proofSSk, ipk.getHRand(), proofSRNym); t.sub(nym.mul(proofC)); // create array for proof data that will...
[ "public", "boolean", "verify", "(", "ECP", "nym", ",", "IdemixIssuerPublicKey", "ipk", ",", "byte", "[", "]", "msg", ")", "{", "if", "(", "nym", "==", "null", "||", "ipk", "==", "null", "||", "msg", "==", "null", ")", "{", "return", "false", ";", "...
Verify this IdemixPseudonymSignature @param nym the pseudonym with respect to which the signature is verified @param ipk the issuer public key @param msg the message that should be signed in this signature @return true iff valid
[ "Verify", "this", "IdemixPseudonymSignature" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixPseudonymSignature.java#L105-L129
22,036
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixSignature.java
IdemixSignature.toProto
public Idemix.Signature toProto() { Idemix.Signature.Builder builder = Idemix.Signature.newBuilder() .setAPrime(IdemixUtils.transformToProto(aPrime)) .setABar(IdemixUtils.transformToProto(aBar)) .setBPrime(IdemixUtils.transformToProto(bPrime)) .set...
java
public Idemix.Signature toProto() { Idemix.Signature.Builder builder = Idemix.Signature.newBuilder() .setAPrime(IdemixUtils.transformToProto(aPrime)) .setABar(IdemixUtils.transformToProto(aBar)) .setBPrime(IdemixUtils.transformToProto(bPrime)) .set...
[ "public", "Idemix", ".", "Signature", "toProto", "(", ")", "{", "Idemix", ".", "Signature", ".", "Builder", "builder", "=", "Idemix", ".", "Signature", ".", "newBuilder", "(", ")", ".", "setAPrime", "(", "IdemixUtils", ".", "transformToProto", "(", "aPrime",...
Convert this signature to a proto @return a protobuf object representing this IdemixSignature
[ "Convert", "this", "signature", "to", "a", "proto" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixSignature.java#L352-L376
22,037
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixSignature.java
IdemixSignature.hiddenIndices
private int[] hiddenIndices(boolean[] disclosure) { if (disclosure == null) { throw new IllegalArgumentException("cannot compute hidden indices of null disclosure"); } List<Integer> hiddenIndicesList = new ArrayList<>(); for (int i = 0; i < disclosure.length; i++) { ...
java
private int[] hiddenIndices(boolean[] disclosure) { if (disclosure == null) { throw new IllegalArgumentException("cannot compute hidden indices of null disclosure"); } List<Integer> hiddenIndicesList = new ArrayList<>(); for (int i = 0; i < disclosure.length; i++) { ...
[ "private", "int", "[", "]", "hiddenIndices", "(", "boolean", "[", "]", "disclosure", ")", "{", "if", "(", "disclosure", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"cannot compute hidden indices of null disclosure\"", ")", ";", "}", ...
Some attributes may be hidden, some disclosed. The indices of the hidden attributes will be passed. @param disclosure an array where the i-th value indicates whether or not the i-th attribute should be disclosed @return an integer array of the hidden indices
[ "Some", "attributes", "may", "be", "hidden", "some", "disclosed", ".", "The", "indices", "of", "the", "hidden", "attributes", "will", "be", "passed", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/idemix/IdemixSignature.java#L384-L400
22,038
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.setExecutorService
public synchronized void setExecutorService(ExecutorService executorService) throws InvalidArgumentException { if (executorService == null) { throw new InvalidArgumentException("Executor service can not be null."); } if (this.executorService != null && this.executorService != execut...
java
public synchronized void setExecutorService(ExecutorService executorService) throws InvalidArgumentException { if (executorService == null) { throw new InvalidArgumentException("Executor service can not be null."); } if (this.executorService != null && this.executorService != execut...
[ "public", "synchronized", "void", "setExecutorService", "(", "ExecutorService", "executorService", ")", "throws", "InvalidArgumentException", "{", "if", "(", "executorService", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Executor service ca...
Set executor service Applications need to set the executor service prior to doing any other operations on the client. @param executorService The executor service the application wants to use. @throws InvalidArgumentException if executor service has been set already.
[ "Set", "executor", "service", "Applications", "need", "to", "set", "the", "executor", "service", "prior", "to", "doing", "any", "other", "operations", "on", "the", "client", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L132-L143
22,039
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newChannel
public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(nam...
java
public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(nam...
[ "public", "Channel", "newChannel", "(", "String", "name", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "if", "(", "Utils", ".", "isNullOrEmpty", "(", "name", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Ch...
newChannel - already configured channel. @param name @return a new channel. @throws InvalidArgumentException
[ "newChannel", "-", "already", "configured", "channel", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L230-L249
22,040
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newChannel
public Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures) throws TransactionException, InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new Invali...
java
public Channel newChannel(String name, Orderer orderer, ChannelConfiguration channelConfiguration, byte[]... channelConfigurationSignatures) throws TransactionException, InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new Invali...
[ "public", "Channel", "newChannel", "(", "String", "name", ",", "Orderer", "orderer", ",", "ChannelConfiguration", "channelConfiguration", ",", "byte", "[", "]", "...", "channelConfigurationSignatures", ")", "throws", "TransactionException", ",", "InvalidArgumentException"...
Create a new channel @param name The channel's name @param orderer Orderer to create the channel with. @param channelConfiguration Channel configuration data. @param channelConfigurationSignatures byte arrays containing ConfigSignature's proto serialized. See ...
[ "Create", "a", "new", "channel" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L264-L288
22,041
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newPeer
public Peer newPeer(String name, String grpcURL) throws InvalidArgumentException { clientCheck(); return Peer.createNewInstance(name, grpcURL, null); }
java
public Peer newPeer(String name, String grpcURL) throws InvalidArgumentException { clientCheck(); return Peer.createNewInstance(name, grpcURL, null); }
[ "public", "Peer", "newPeer", "(", "String", "name", ",", "String", "grpcURL", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "return", "Peer", ".", "createNewInstance", "(", "name", ",", "grpcURL", ",", "null", ")", ";", "}" ]
newPeer create a new peer @param name @param grpcURL to the peer's location @return Peer @throws InvalidArgumentException
[ "newPeer", "create", "a", "new", "peer" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L406-L409
22,042
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.sendLifecycleQueryInstalledChaincode
public Collection<LifecycleQueryInstalledChaincodeProposalResponse> sendLifecycleQueryInstalledChaincode(LifecycleQueryInstalledChaincodeRequest lifecycleQueryInstalledChaincodeRequest, Collection<Peer> peers) t...
java
public Collection<LifecycleQueryInstalledChaincodeProposalResponse> sendLifecycleQueryInstalledChaincode(LifecycleQueryInstalledChaincodeRequest lifecycleQueryInstalledChaincodeRequest, Collection<Peer> peers) t...
[ "public", "Collection", "<", "LifecycleQueryInstalledChaincodeProposalResponse", ">", "sendLifecycleQueryInstalledChaincode", "(", "LifecycleQueryInstalledChaincodeRequest", "lifecycleQueryInstalledChaincodeRequest", ",", "Collection", "<", "Peer", ">", "peers", ")", "throws", "Inv...
Query installed chaincode on a peer. @param lifecycleQueryInstalledChaincodeRequest The request {@link LifecycleQueryInstalledChaincodeRequest} @param peers the peer to send the request to. @return LifecycleQueryInstalledChaincodeProposalResponse @throws InvalidArgumentException @thro...
[ "Query", "installed", "chaincode", "on", "a", "peer", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L539-L578
22,043
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.sendLifecycleQueryInstalledChaincodes
public Collection<LifecycleQueryInstalledChaincodesProposalResponse> sendLifecycleQueryInstalledChaincodes(LifecycleQueryInstalledChaincodesRequest lifecycleQueryInstalledChaincodesRequest, Collection<Peer> pe...
java
public Collection<LifecycleQueryInstalledChaincodesProposalResponse> sendLifecycleQueryInstalledChaincodes(LifecycleQueryInstalledChaincodesRequest lifecycleQueryInstalledChaincodesRequest, Collection<Peer> pe...
[ "public", "Collection", "<", "LifecycleQueryInstalledChaincodesProposalResponse", ">", "sendLifecycleQueryInstalledChaincodes", "(", "LifecycleQueryInstalledChaincodesRequest", "lifecycleQueryInstalledChaincodesRequest", ",", "Collection", "<", "Peer", ">", "peers", ")", "throws", ...
Query the peer for installed chaincodes information @param lifecycleQueryInstalledChaincodesRequest the request {@link LifecycleQueryInstalledChaincodesRequest} @param peers The peer to query. @return Collection of ChaincodeInfo on installed chaincode @see {@link LifecycleQueryInstal...
[ "Query", "the", "peer", "for", "installed", "chaincodes", "information" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L590-L618
22,044
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.setUserContext
public User setUserContext(User userContext) throws InvalidArgumentException { if (null == cryptoSuite) { throw new InvalidArgumentException("No cryptoSuite has been set."); } userContextCheck(userContext); User ret = this.userContext; this.userContext = userContext...
java
public User setUserContext(User userContext) throws InvalidArgumentException { if (null == cryptoSuite) { throw new InvalidArgumentException("No cryptoSuite has been set."); } userContextCheck(userContext); User ret = this.userContext; this.userContext = userContext...
[ "public", "User", "setUserContext", "(", "User", "userContext", ")", "throws", "InvalidArgumentException", "{", "if", "(", "null", "==", "cryptoSuite", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"No cryptoSuite has been set.\"", ")", ";", "}", "use...
Set the User context for this client. @param userContext @return the old user context. Maybe null if never set! @throws InvalidArgumentException
[ "Set", "the", "User", "context", "for", "this", "client", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L669-L683
22,045
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newOrderer
public Orderer newOrderer(String name, String grpcURL) throws InvalidArgumentException { clientCheck(); return newOrderer(name, grpcURL, null); }
java
public Orderer newOrderer(String name, String grpcURL) throws InvalidArgumentException { clientCheck(); return newOrderer(name, grpcURL, null); }
[ "public", "Orderer", "newOrderer", "(", "String", "name", ",", "String", "grpcURL", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "return", "newOrderer", "(", "name", ",", "grpcURL", ",", "null", ")", ";", "}" ]
Create a new urlOrderer. @param name name of the orderer. @param grpcURL url location of orderer grpc or grpcs protocol. @return a new Orderer. @throws InvalidArgumentException
[ "Create", "a", "new", "urlOrderer", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L694-L697
22,046
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newOrderer
public Orderer newOrderer(String name, String grpcURL, Properties properties) throws InvalidArgumentException { clientCheck(); return Orderer.createNewInstance(name, grpcURL, properties); }
java
public Orderer newOrderer(String name, String grpcURL, Properties properties) throws InvalidArgumentException { clientCheck(); return Orderer.createNewInstance(name, grpcURL, properties); }
[ "public", "Orderer", "newOrderer", "(", "String", "name", ",", "String", "grpcURL", ",", "Properties", "properties", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "return", "Orderer", ".", "createNewInstance", "(", "name", ",", "g...
Create a new orderer. @param name name of Orderer. @param grpcURL url location of orderer grpc or grpcs protocol. @param properties <p> Supported properties <ul> <li>pemFile - File location for x509 pem certificate for SSL.</li> <li>pemBytes - byte array for x509 pem certificates for SSL</li> <li>trustServerC...
[ "Create", "a", "new", "orderer", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L740-L743
22,047
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.queryChannels
public Set<String> queryChannels(Peer peer) throws InvalidArgumentException, ProposalException { clientCheck(); if (null == peer) { throw new InvalidArgumentException("peer set to null"); } //Run this on a system channel. try { Channel systemChannel ...
java
public Set<String> queryChannels(Peer peer) throws InvalidArgumentException, ProposalException { clientCheck(); if (null == peer) { throw new InvalidArgumentException("peer set to null"); } //Run this on a system channel. try { Channel systemChannel ...
[ "public", "Set", "<", "String", ">", "queryChannels", "(", "Peer", "peer", ")", "throws", "InvalidArgumentException", ",", "ProposalException", "{", "clientCheck", "(", ")", ";", "if", "(", "null", "==", "peer", ")", "{", "throw", "new", "InvalidArgumentExcept...
Query the joined channels for peers @param peer the peer to query @return A set of strings with the names of the channels the peer has joined. @throws InvalidArgumentException @throws ProposalException
[ "Query", "the", "joined", "channels", "for", "peers" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L753-L776
22,048
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.queryInstalledChaincodes
public List<ChaincodeInfo> queryInstalledChaincodes(Peer peer) throws InvalidArgumentException, ProposalException { clientCheck(); if (null == peer) { throw new InvalidArgumentException("peer set to null"); } try { //Run this on a system channel. ...
java
public List<ChaincodeInfo> queryInstalledChaincodes(Peer peer) throws InvalidArgumentException, ProposalException { clientCheck(); if (null == peer) { throw new InvalidArgumentException("peer set to null"); } try { //Run this on a system channel. ...
[ "public", "List", "<", "ChaincodeInfo", ">", "queryInstalledChaincodes", "(", "Peer", "peer", ")", "throws", "InvalidArgumentException", ",", "ProposalException", "{", "clientCheck", "(", ")", ";", "if", "(", "null", "==", "peer", ")", "{", "throw", "new", "In...
Query the peer for installed chaincode information @param peer The peer to query. @return List of ChaincodeInfo on installed chaincode @see {@link ChaincodeInfo} @throws InvalidArgumentException @throws ProposalException @deprecated See {@link LifecycleQueryInstalledChaincodesRequest}
[ "Query", "the", "peer", "for", "installed", "chaincode", "information" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L788-L809
22,049
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.getChannelConfigurationSignature
public byte[] getChannelConfigurationSignature(ChannelConfiguration channelConfiguration, User signer) throws InvalidArgumentException { clientCheck(); Channel systemChannel = Channel.newSystemChannel(this); return systemChannel.getChannelConfigurationSignature(channelConfiguration...
java
public byte[] getChannelConfigurationSignature(ChannelConfiguration channelConfiguration, User signer) throws InvalidArgumentException { clientCheck(); Channel systemChannel = Channel.newSystemChannel(this); return systemChannel.getChannelConfigurationSignature(channelConfiguration...
[ "public", "byte", "[", "]", "getChannelConfigurationSignature", "(", "ChannelConfiguration", "channelConfiguration", ",", "User", "signer", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "Channel", "systemChannel", "=", "Channel", ".", "...
Get signature for channel configuration @param channelConfiguration @param signer @return byte array with the signature @throws InvalidArgumentException
[ "Get", "signature", "for", "channel", "configuration" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L820-L828
22,050
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.getUpdateChannelConfigurationSignature
public byte[] getUpdateChannelConfigurationSignature(UpdateChannelConfiguration updateChannelConfiguration, User signer) throws InvalidArgumentException { clientCheck(); Channel systemChannel = Channel.newSystemChannel(this); return syst...
java
public byte[] getUpdateChannelConfigurationSignature(UpdateChannelConfiguration updateChannelConfiguration, User signer) throws InvalidArgumentException { clientCheck(); Channel systemChannel = Channel.newSystemChannel(this); return syst...
[ "public", "byte", "[", "]", "getUpdateChannelConfigurationSignature", "(", "UpdateChannelConfiguration", "updateChannelConfiguration", ",", "User", "signer", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "Channel", "systemChannel", "=", "Ch...
Get signature for update channel configuration @param updateChannelConfiguration @param signer @return byte array with the signature @throws InvalidArgumentException
[ "Get", "signature", "for", "update", "channel", "configuration" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L839-L847
22,051
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/helper/Config.java
Config.getProperty
private String getProperty(String property) { String ret = sdkProperties.getProperty(property); if (null == ret) { logger.warn(String.format("No configuration value found for '%s'", property)); } return ret; }
java
private String getProperty(String property) { String ret = sdkProperties.getProperty(property); if (null == ret) { logger.warn(String.format("No configuration value found for '%s'", property)); } return ret; }
[ "private", "String", "getProperty", "(", "String", "property", ")", "{", "String", "ret", "=", "sdkProperties", ".", "getProperty", "(", "property", ")", ";", "if", "(", "null", "==", "ret", ")", "{", "logger", ".", "warn", "(", "String", ".", "format", ...
getProperty return back property for the given value. @param property @return String value for the property
[ "getProperty", "return", "back", "property", "for", "the", "given", "value", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/helper/Config.java#L170-L178
22,052
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeEvent.java
ChaincodeEvent.getPayload
public byte[] getPayload() { ByteString ret = getChaincodeEvent().getPayload(); if (null == ret) { return null; } return ret.toByteArray(); }
java
public byte[] getPayload() { ByteString ret = getChaincodeEvent().getPayload(); if (null == ret) { return null; } return ret.toByteArray(); }
[ "public", "byte", "[", "]", "getPayload", "(", ")", "{", "ByteString", "ret", "=", "getChaincodeEvent", "(", ")", ".", "getPayload", "(", ")", ";", "if", "(", "null", "==", "ret", ")", "{", "return", "null", ";", "}", "return", "ret", ".", "toByteArr...
Binary data associated with this event. @return binary data set by the chaincode for this event. This may return null.
[ "Binary", "data", "associated", "with", "this", "event", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeEvent.java#L99-L108
22,053
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java
LifecycleChaincodePackage.fromStream
public static LifecycleChaincodePackage fromStream(InputStream inputStream) throws IOException, InvalidArgumentException { if (null == inputStream) { throw new InvalidArgumentException("The parameter inputStream may not be null."); } byte[] packageBytes = IOUtils.toByteArray(inputStr...
java
public static LifecycleChaincodePackage fromStream(InputStream inputStream) throws IOException, InvalidArgumentException { if (null == inputStream) { throw new InvalidArgumentException("The parameter inputStream may not be null."); } byte[] packageBytes = IOUtils.toByteArray(inputStr...
[ "public", "static", "LifecycleChaincodePackage", "fromStream", "(", "InputStream", "inputStream", ")", "throws", "IOException", ",", "InvalidArgumentException", "{", "if", "(", "null", "==", "inputStream", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"...
Construct a LifecycleChaincodePackage from a stream. @param inputStream The stream containing the lifecycle chaincode package. This stream is NOT closed. @throws IOException
[ "Construct", "a", "LifecycleChaincodePackage", "from", "a", "stream", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java#L98-L104
22,054
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java
LifecycleChaincodePackage.getAsBytes
public byte[] getAsBytes() { byte[] ret = new byte[pBytes.length]; System.arraycopy(pBytes, 0, ret, 0, pBytes.length); //make sure we keep our own copy. return ret; }
java
public byte[] getAsBytes() { byte[] ret = new byte[pBytes.length]; System.arraycopy(pBytes, 0, ret, 0, pBytes.length); //make sure we keep our own copy. return ret; }
[ "public", "byte", "[", "]", "getAsBytes", "(", ")", "{", "byte", "[", "]", "ret", "=", "new", "byte", "[", "pBytes", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "pBytes", ",", "0", ",", "ret", ",", "0", ",", "pBytes", ".", "length",...
Lifecycle chaincode package as bytes @return Lifecycle chaincode package as bytes.
[ "Lifecycle", "chaincode", "package", "as", "bytes" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java#L123-L128
22,055
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java
LifecycleChaincodePackage.toFile
public void toFile(Path path, OpenOption... options) throws IOException { Files.write(path, pBytes, options); }
java
public void toFile(Path path, OpenOption... options) throws IOException { Files.write(path, pBytes, options); }
[ "public", "void", "toFile", "(", "Path", "path", ",", "OpenOption", "...", "options", ")", "throws", "IOException", "{", "Files", ".", "write", "(", "path", ",", "pBytes", ",", "options", ")", ";", "}" ]
Write Lifecycle chaincode package bytes to file. @param path of the file to write to. @param options Options on creating file. @throws IOException
[ "Write", "Lifecycle", "chaincode", "package", "bytes", "to", "file", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleChaincodePackage.java#L138-L141
22,056
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/CollectionConfigPackage.java
CollectionConfigPackage.getCollectionConfigPackage
public org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage getCollectionConfigPackage() throws InvalidProtocolBufferException { if (null == cp) { cp = org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage.parseFrom(collectionConfigBytes); } retu...
java
public org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage getCollectionConfigPackage() throws InvalidProtocolBufferException { if (null == cp) { cp = org.hyperledger.fabric.protos.common.Collection.CollectionConfigPackage.parseFrom(collectionConfigBytes); } retu...
[ "public", "org", ".", "hyperledger", ".", "fabric", ".", "protos", ".", "common", ".", "Collection", ".", "CollectionConfigPackage", "getCollectionConfigPackage", "(", ")", "throws", "InvalidProtocolBufferException", "{", "if", "(", "null", "==", "cp", ")", "{", ...
The raw collection information returned from the peer. @return The raw collection information returned from the peer. @throws InvalidProtocolBufferException
[ "The", "raw", "collection", "information", "returned", "from", "the", "peer", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/CollectionConfigPackage.java#L46-L53
22,057
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/CollectionConfigPackage.java
CollectionConfigPackage.getCollectionConfigs
public Collection<CollectionConfig> getCollectionConfigs() throws InvalidProtocolBufferException { List<CollectionConfig> ret = new LinkedList<>(); for (org.hyperledger.fabric.protos.common.Collection.CollectionConfig collectionConfig : getCollectionConfigPackage().getConfigList()) { ret.add...
java
public Collection<CollectionConfig> getCollectionConfigs() throws InvalidProtocolBufferException { List<CollectionConfig> ret = new LinkedList<>(); for (org.hyperledger.fabric.protos.common.Collection.CollectionConfig collectionConfig : getCollectionConfigPackage().getConfigList()) { ret.add...
[ "public", "Collection", "<", "CollectionConfig", ">", "getCollectionConfigs", "(", ")", "throws", "InvalidProtocolBufferException", "{", "List", "<", "CollectionConfig", ">", "ret", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "org", ".", "hyperled...
Collection of the chaincode collections. @return Collection of the chaincode collection @throws InvalidProtocolBufferException
[ "Collection", "of", "the", "chaincode", "collections", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/CollectionConfigPackage.java#L61-L69
22,058
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java
HFCACertificateRequest.setRevokedStart
public void setRevokedStart(Date revokedStart) throws InvalidArgumentException { if (revokedStart == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("revoked_start", Util.dateToString(revokedStart)); }
java
public void setRevokedStart(Date revokedStart) throws InvalidArgumentException { if (revokedStart == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("revoked_start", Util.dateToString(revokedStart)); }
[ "public", "void", "setRevokedStart", "(", "Date", "revokedStart", ")", "throws", "InvalidArgumentException", "{", "if", "(", "revokedStart", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Date can't be null\"", ")", ";", "}", "queryParms...
Get certificates that have been revoked after this date @param revokedStart Revoked after date @throws InvalidArgumentException Date can't be null
[ "Get", "certificates", "that", "have", "been", "revoked", "after", "this", "date" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java#L57-L62
22,059
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java
HFCACertificateRequest.setRevokedEnd
public void setRevokedEnd(Date revokedEnd) throws InvalidArgumentException { if (revokedEnd == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("revoked_end", Util.dateToString(revokedEnd)); }
java
public void setRevokedEnd(Date revokedEnd) throws InvalidArgumentException { if (revokedEnd == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("revoked_end", Util.dateToString(revokedEnd)); }
[ "public", "void", "setRevokedEnd", "(", "Date", "revokedEnd", ")", "throws", "InvalidArgumentException", "{", "if", "(", "revokedEnd", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Date can't be null\"", ")", ";", "}", "queryParms", "...
Get certificates that have been revoked before this date @param revokedEnd Revoked before date @throws InvalidArgumentException Date can't be null
[ "Get", "certificates", "that", "have", "been", "revoked", "before", "this", "date" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java#L70-L75
22,060
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java
HFCACertificateRequest.setExpiredStart
public void setExpiredStart(Date expiredStart) throws InvalidArgumentException { if (expiredStart == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("expired_start", Util.dateToString(expiredStart)); }
java
public void setExpiredStart(Date expiredStart) throws InvalidArgumentException { if (expiredStart == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("expired_start", Util.dateToString(expiredStart)); }
[ "public", "void", "setExpiredStart", "(", "Date", "expiredStart", ")", "throws", "InvalidArgumentException", "{", "if", "(", "expiredStart", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Date can't be null\"", ")", ";", "}", "queryParms...
Get certificates that have expired after this date @param expiredStart Expired after date @throws InvalidArgumentException Date can't be null
[ "Get", "certificates", "that", "have", "expired", "after", "this", "date" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java#L83-L88
22,061
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java
HFCACertificateRequest.setExpiredEnd
public void setExpiredEnd(Date expiredEnd) throws InvalidArgumentException { if (expiredEnd == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("expired_end", Util.dateToString(expiredEnd)); }
java
public void setExpiredEnd(Date expiredEnd) throws InvalidArgumentException { if (expiredEnd == null) { throw new InvalidArgumentException("Date can't be null"); } queryParms.put("expired_end", Util.dateToString(expiredEnd)); }
[ "public", "void", "setExpiredEnd", "(", "Date", "expiredEnd", ")", "throws", "InvalidArgumentException", "{", "if", "(", "expiredEnd", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Date can't be null\"", ")", ";", "}", "queryParms", "...
Get certificates that have expired before this date @param expiredEnd Expired end date @throws InvalidArgumentException Date can't be null
[ "Get", "certificates", "that", "have", "expired", "before", "this", "date" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCACertificateRequest.java#L96-L101
22,062
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/SDKUtils.java
SDKUtils.calculateBlockHash
public static byte[] calculateBlockHash(HFClient client, long blockNumber, byte[] previousHash, byte[] dataHash) throws IOException, InvalidArgumentException { if (previousHash == null) { throw new InvalidArgumentException("previousHash parameter is null."); } if (dataHash == null) ...
java
public static byte[] calculateBlockHash(HFClient client, long blockNumber, byte[] previousHash, byte[] dataHash) throws IOException, InvalidArgumentException { if (previousHash == null) { throw new InvalidArgumentException("previousHash parameter is null."); } if (dataHash == null) ...
[ "public", "static", "byte", "[", "]", "calculateBlockHash", "(", "HFClient", "client", ",", "long", "blockNumber", ",", "byte", "[", "]", "previousHash", ",", "byte", "[", "]", "dataHash", ")", "throws", "IOException", ",", "InvalidArgumentException", "{", "if...
used asn1 and get hash @param blockNumber @param previousHash @param dataHash @return byte[] @throws IOException @throws InvalidArgumentException
[ "used", "asn1", "and", "get", "hash" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/SDKUtils.java#L59-L84
22,063
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/RevocationRequest.java
RevocationRequest.toJsonObject
private JsonObject toJsonObject() { JsonObjectBuilder factory = Json.createObjectBuilder(); if (enrollmentID != null) { // revoke all enrollments of this user, serial and aki are ignored in this case factory.add("id", enrollmentID); } else { // revoke one part...
java
private JsonObject toJsonObject() { JsonObjectBuilder factory = Json.createObjectBuilder(); if (enrollmentID != null) { // revoke all enrollments of this user, serial and aki are ignored in this case factory.add("id", enrollmentID); } else { // revoke one part...
[ "private", "JsonObject", "toJsonObject", "(", ")", "{", "JsonObjectBuilder", "factory", "=", "Json", ".", "createObjectBuilder", "(", ")", ";", "if", "(", "enrollmentID", "!=", "null", ")", "{", "// revoke all enrollments of this user, serial and aki are ignored in this c...
Convert the revocation request to a JSON object
[ "Convert", "the", "revocation", "request", "to", "a", "JSON", "object" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/RevocationRequest.java#L114-L137
22,064
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/transaction/ProtoUtils.java
ProtoUtils.computeUpdate
public static boolean computeUpdate(String channelId, Configtx.Config original, Configtx.Config update, Configtx.ConfigUpdate.Builder configUpdateBuilder) { Configtx.ConfigGroup.Builder readSetBuilder = Configtx.ConfigGroup.newBuilder(); Configtx.ConfigGroup.Builder writeSetBuilder = Configtx.ConfigGro...
java
public static boolean computeUpdate(String channelId, Configtx.Config original, Configtx.Config update, Configtx.ConfigUpdate.Builder configUpdateBuilder) { Configtx.ConfigGroup.Builder readSetBuilder = Configtx.ConfigGroup.newBuilder(); Configtx.ConfigGroup.Builder writeSetBuilder = Configtx.ConfigGro...
[ "public", "static", "boolean", "computeUpdate", "(", "String", "channelId", ",", "Configtx", ".", "Config", "original", ",", "Configtx", ".", "Config", "update", ",", "Configtx", ".", "ConfigUpdate", ".", "Builder", "configUpdateBuilder", ")", "{", "Configtx", "...
not an api
[ "not", "an", "api" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/transaction/ProtoUtils.java#L308-L323
22,065
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java
ProposalResponse.getChaincodeID
public ChaincodeID getChaincodeID() throws InvalidArgumentException { try { if (chaincodeID == null) { Header header = Header.parseFrom(proposal.getHeader()); Common.ChannelHeader channelHeader = Common.ChannelHeader.parseFrom(header.getChannelHeader()); ...
java
public ChaincodeID getChaincodeID() throws InvalidArgumentException { try { if (chaincodeID == null) { Header header = Header.parseFrom(proposal.getHeader()); Common.ChannelHeader channelHeader = Common.ChannelHeader.parseFrom(header.getChannelHeader()); ...
[ "public", "ChaincodeID", "getChaincodeID", "(", ")", "throws", "InvalidArgumentException", "{", "try", "{", "if", "(", "chaincodeID", "==", "null", ")", "{", "Header", "header", "=", "Header", ".", "parseFrom", "(", "proposal", ".", "getHeader", "(", ")", ")...
Chaincode ID that was executed. @return See {@link ChaincodeID} @throws InvalidArgumentException
[ "Chaincode", "ID", "that", "was", "executed", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java#L243-L260
22,066
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java
ProposalResponse.getChaincodeActionResponsePayload
public byte[] getChaincodeActionResponsePayload() throws InvalidArgumentException { if (isInvalid()) { throw new InvalidArgumentException("Proposal response is invalid."); } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDeserializer = getPropos...
java
public byte[] getChaincodeActionResponsePayload() throws InvalidArgumentException { if (isInvalid()) { throw new InvalidArgumentException("Proposal response is invalid."); } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDeserializer = getPropos...
[ "public", "byte", "[", "]", "getChaincodeActionResponsePayload", "(", ")", "throws", "InvalidArgumentException", "{", "if", "(", "isInvalid", "(", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Proposal response is invalid.\"", ")", ";", "}", "tr...
ChaincodeActionResponsePayload is the result of the executing chaincode. @return the result of the executing chaincode. @throws InvalidArgumentException
[ "ChaincodeActionResponsePayload", "is", "the", "result", "of", "the", "executing", "chaincode", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java#L269-L288
22,067
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java
ProposalResponse.getChaincodeActionResponseStatus
public int getChaincodeActionResponseStatus() throws InvalidArgumentException { if (statusReturnCode != -1) { return statusReturnCode; } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDeserializer = getProposalResponsePayloadDeserializer(); ...
java
public int getChaincodeActionResponseStatus() throws InvalidArgumentException { if (statusReturnCode != -1) { return statusReturnCode; } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDeserializer = getProposalResponsePayloadDeserializer(); ...
[ "public", "int", "getChaincodeActionResponseStatus", "(", ")", "throws", "InvalidArgumentException", "{", "if", "(", "statusReturnCode", "!=", "-", "1", ")", "{", "return", "statusReturnCode", ";", "}", "try", "{", "final", "ProposalResponsePayloadDeserializer", "prop...
getChaincodeActionResponseStatus returns the what chaincode executions set as the return status. @return status code. @throws InvalidArgumentException
[ "getChaincodeActionResponseStatus", "returns", "the", "what", "chaincode", "executions", "set", "as", "the", "return", "status", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java#L297-L315
22,068
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java
ProposalResponse.getChaincodeActionResponseReadWriteSetInfo
public TxReadWriteSetInfo getChaincodeActionResponseReadWriteSetInfo() throws InvalidArgumentException { if (isInvalid()) { throw new InvalidArgumentException("Proposal response is invalid."); } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDes...
java
public TxReadWriteSetInfo getChaincodeActionResponseReadWriteSetInfo() throws InvalidArgumentException { if (isInvalid()) { throw new InvalidArgumentException("Proposal response is invalid."); } try { final ProposalResponsePayloadDeserializer proposalResponsePayloadDes...
[ "public", "TxReadWriteSetInfo", "getChaincodeActionResponseReadWriteSetInfo", "(", ")", "throws", "InvalidArgumentException", "{", "if", "(", "isInvalid", "(", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Proposal response is invalid.\"", ")", ";", "...
getChaincodeActionResponseReadWriteSetInfo get this proposals read write set. @return The read write set. See {@link TxReadWriteSetInfo} @throws InvalidArgumentException
[ "getChaincodeActionResponseReadWriteSetInfo", "get", "this", "proposals", "read", "write", "set", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ProposalResponse.java#L324-L346
22,069
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.bytesToPrivateKey
public PrivateKey bytesToPrivateKey(byte[] pemKey) throws CryptoException { PrivateKey pk = null; CryptoException ce = null; try { PemReader pr = new PemReader(new StringReader(new String(pemKey))); PemObject po = pr.readPemObject(); PEMParser pem = new PEMPa...
java
public PrivateKey bytesToPrivateKey(byte[] pemKey) throws CryptoException { PrivateKey pk = null; CryptoException ce = null; try { PemReader pr = new PemReader(new StringReader(new String(pemKey))); PemObject po = pr.readPemObject(); PEMParser pem = new PEMPa...
[ "public", "PrivateKey", "bytesToPrivateKey", "(", "byte", "[", "]", "pemKey", ")", "throws", "CryptoException", "{", "PrivateKey", "pk", "=", "null", ";", "CryptoException", "ce", "=", "null", ";", "try", "{", "PemReader", "pr", "=", "new", "PemReader", "(",...
Return PrivateKey from pem bytes. @param pemKey pem-encoded private key @return
[ "Return", "PrivateKey", "from", "pem", "bytes", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L273-L293
22,070
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.addCACertificatesToTrustStore
public void addCACertificatesToTrustStore(BufferedInputStream bis) throws CryptoException, InvalidArgumentException { if (bis == null) { throw new InvalidArgumentException("The certificate stream bis cannot be null"); } try { final Collection<? extends Certificate> cert...
java
public void addCACertificatesToTrustStore(BufferedInputStream bis) throws CryptoException, InvalidArgumentException { if (bis == null) { throw new InvalidArgumentException("The certificate stream bis cannot be null"); } try { final Collection<? extends Certificate> cert...
[ "public", "void", "addCACertificatesToTrustStore", "(", "BufferedInputStream", "bis", ")", "throws", "CryptoException", ",", "InvalidArgumentException", "{", "if", "(", "bis", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"The certificate st...
addCACertificatesToTrustStore adds a CA certs in a stream to the trust store used for signature validation @param bis an X.509 certificate stream in PEM format in bytes @throws CryptoException @throws InvalidArgumentException
[ "addCACertificatesToTrustStore", "adds", "a", "CA", "certs", "in", "a", "stream", "to", "the", "trust", "store", "used", "for", "signature", "validation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L427-L442
22,071
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.validateCertificate
boolean validateCertificate(byte[] certPEM) { if (certPEM == null) { return false; } try { X509Certificate certificate = getX509Certificate(certPEM); if (null == certificate) { throw new Exception("Certificate transformation returned null");...
java
boolean validateCertificate(byte[] certPEM) { if (certPEM == null) { return false; } try { X509Certificate certificate = getX509Certificate(certPEM); if (null == certificate) { throw new Exception("Certificate transformation returned null");...
[ "boolean", "validateCertificate", "(", "byte", "[", "]", "certPEM", ")", "{", "if", "(", "certPEM", "==", "null", ")", "{", "return", "false", ";", "}", "try", "{", "X509Certificate", "certificate", "=", "getX509Certificate", "(", "certPEM", ")", ";", "if"...
validateCertificate checks whether the given certificate is trusted. It checks if the certificate is signed by one of the trusted certs in the trust store. @param certPEM the certificate in PEM format @return true if the certificate is trusted
[ "validateCertificate", "checks", "whether", "the", "given", "certificate", "is", "trusted", ".", "It", "checks", "if", "the", "certificate", "is", "signed", "by", "one", "of", "the", "trusted", "certs", "in", "the", "trust", "store", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L539-L558
22,072
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.setSecurityLevel
void setSecurityLevel(final int securityLevel) throws InvalidArgumentException { logger.trace(format("setSecurityLevel to %d", securityLevel)); if (securityCurveMapping.isEmpty()) { throw new InvalidArgumentException("Security curve mapping has no entries."); } if (!securit...
java
void setSecurityLevel(final int securityLevel) throws InvalidArgumentException { logger.trace(format("setSecurityLevel to %d", securityLevel)); if (securityCurveMapping.isEmpty()) { throw new InvalidArgumentException("Security curve mapping has no entries."); } if (!securit...
[ "void", "setSecurityLevel", "(", "final", "int", "securityLevel", ")", "throws", "InvalidArgumentException", "{", "logger", ".", "trace", "(", "format", "(", "\"setSecurityLevel to %d\"", ",", "securityLevel", ")", ")", ";", "if", "(", "securityCurveMapping", ".", ...
Security Level determines the elliptic curve used in key generation @param securityLevel currently 256 or 384 @throws InvalidArgumentException
[ "Security", "Level", "determines", "the", "elliptic", "curve", "used", "in", "key", "generation" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L598-L635
22,073
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.decodeECDSASignature
private static BigInteger[] decodeECDSASignature(byte[] signature) throws Exception { try (ByteArrayInputStream inStream = new ByteArrayInputStream(signature)) { ASN1InputStream asnInputStream = new ASN1InputStream(inStream); ASN1Primitive asn1 = asnInputStream.readObject(); ...
java
private static BigInteger[] decodeECDSASignature(byte[] signature) throws Exception { try (ByteArrayInputStream inStream = new ByteArrayInputStream(signature)) { ASN1InputStream asnInputStream = new ASN1InputStream(inStream); ASN1Primitive asn1 = asnInputStream.readObject(); ...
[ "private", "static", "BigInteger", "[", "]", "decodeECDSASignature", "(", "byte", "[", "]", "signature", ")", "throws", "Exception", "{", "try", "(", "ByteArrayInputStream", "inStream", "=", "new", "ByteArrayInputStream", "(", "signature", ")", ")", "{", "ASN1In...
Decodes an ECDSA signature and returns a two element BigInteger array. @param signature ECDSA signature bytes. @return BigInteger array for the signature's r and s values @throws Exception
[ "Decodes", "an", "ECDSA", "signature", "and", "returns", "a", "two", "element", "BigInteger", "array", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L675-L705
22,074
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.ecdsaSignToBytes
private byte[] ecdsaSignToBytes(ECPrivateKey privateKey, byte[] data) throws CryptoException { if (data == null) { throw new CryptoException("Data that to be signed is null."); } if (data.length == 0) { throw new CryptoException("Data to be signed was empty."); } ...
java
private byte[] ecdsaSignToBytes(ECPrivateKey privateKey, byte[] data) throws CryptoException { if (data == null) { throw new CryptoException("Data that to be signed is null."); } if (data.length == 0) { throw new CryptoException("Data to be signed was empty."); } ...
[ "private", "byte", "[", "]", "ecdsaSignToBytes", "(", "ECPrivateKey", "privateKey", ",", "byte", "[", "]", "data", ")", "throws", "CryptoException", "{", "if", "(", "data", "==", "null", ")", "{", "throw", "new", "CryptoException", "(", "\"Data that to be sign...
Sign data with the specified elliptic curve private key. @param privateKey elliptic curve private key. @param data data to sign @return the signed data. @throws CryptoException
[ "Sign", "data", "with", "the", "specified", "elliptic", "curve", "private", "key", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L715-L750
22,075
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.certificationRequestToPEM
private String certificationRequestToPEM(PKCS10CertificationRequest csr) throws IOException { PemObject pemCSR = new PemObject("CERTIFICATE REQUEST", csr.getEncoded()); StringWriter str = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(str); pemWriter.writeObject(pemCSR); ...
java
private String certificationRequestToPEM(PKCS10CertificationRequest csr) throws IOException { PemObject pemCSR = new PemObject("CERTIFICATE REQUEST", csr.getEncoded()); StringWriter str = new StringWriter(); JcaPEMWriter pemWriter = new JcaPEMWriter(str); pemWriter.writeObject(pemCSR); ...
[ "private", "String", "certificationRequestToPEM", "(", "PKCS10CertificationRequest", "csr", ")", "throws", "IOException", "{", "PemObject", "pemCSR", "=", "new", "PemObject", "(", "\"CERTIFICATE REQUEST\"", ",", "csr", ".", "getEncoded", "(", ")", ")", ";", "StringW...
certificationRequestToPEM - Convert a PKCS10CertificationRequest to PEM format. @param csr The Certificate to convert @return An equivalent PEM format certificate. @throws IOException
[ "certificationRequestToPEM", "-", "Convert", "a", "PKCS10CertificationRequest", "to", "PEM", "format", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L815-L824
22,076
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java
CryptoPrimitives.resetConfiguration
private void resetConfiguration() throws CryptoException, InvalidArgumentException { setSecurityLevel(securityLevel); setHashAlgorithm(hashAlgorithm); try { cf = CertificateFactory.getInstance(CERTIFICATE_FORMAT); } catch (CertificateException e) { CryptoExcept...
java
private void resetConfiguration() throws CryptoException, InvalidArgumentException { setSecurityLevel(securityLevel); setHashAlgorithm(hashAlgorithm); try { cf = CertificateFactory.getInstance(CERTIFICATE_FORMAT); } catch (CertificateException e) { CryptoExcept...
[ "private", "void", "resetConfiguration", "(", ")", "throws", "CryptoException", ",", "InvalidArgumentException", "{", "setSecurityLevel", "(", "securityLevel", ")", ";", "setHashAlgorithm", "(", "hashAlgorithm", ")", ";", "try", "{", "cf", "=", "CertificateFactory", ...
Resets curve name, hash algorithm and cert factory. Call this method when a config value changes @throws CryptoException @throws InvalidArgumentException
[ "Resets", "curve", "name", "hash", "algorithm", "and", "cert", "factory", ".", "Call", "this", "method", "when", "a", "config", "value", "changes" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/CryptoPrimitives.java#L907-L920
22,077
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryInstalledChaincodeProposalResponse.java
LifecycleQueryInstalledChaincodeProposalResponse.getPackageId
public String getPackageId() throws ProposalException { Lifecycle.QueryInstalledChaincodeResult queryInstalledChaincodeResult = parsePayload(); if (queryInstalledChaincodeResult == null) { return null; } return queryInstalledChaincodeResult.getPackageId(); }
java
public String getPackageId() throws ProposalException { Lifecycle.QueryInstalledChaincodeResult queryInstalledChaincodeResult = parsePayload(); if (queryInstalledChaincodeResult == null) { return null; } return queryInstalledChaincodeResult.getPackageId(); }
[ "public", "String", "getPackageId", "(", ")", "throws", "ProposalException", "{", "Lifecycle", ".", "QueryInstalledChaincodeResult", "queryInstalledChaincodeResult", "=", "parsePayload", "(", ")", ";", "if", "(", "queryInstalledChaincodeResult", "==", "null", ")", "{", ...
The packageId for this chaincode. @return the packageId @throws ProposalException
[ "The", "packageId", "for", "this", "chaincode", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/LifecycleQueryInstalledChaincodeProposalResponse.java#L70-L79
22,078
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.createNewInstance
public static HFCAClient createNewInstance(NetworkConfig.CAInfo caInfo) throws MalformedURLException, InvalidArgumentException { try { return createNewInstance(caInfo, CryptoSuite.Factory.getCryptoSuite()); } catch (MalformedURLException e) { throw e; } catch (Exception ...
java
public static HFCAClient createNewInstance(NetworkConfig.CAInfo caInfo) throws MalformedURLException, InvalidArgumentException { try { return createNewInstance(caInfo, CryptoSuite.Factory.getCryptoSuite()); } catch (MalformedURLException e) { throw e; } catch (Exception ...
[ "public", "static", "HFCAClient", "createNewInstance", "(", "NetworkConfig", ".", "CAInfo", "caInfo", ")", "throws", "MalformedURLException", ",", "InvalidArgumentException", "{", "try", "{", "return", "createNewInstance", "(", "caInfo", ",", "CryptoSuite", ".", "Fact...
Create HFCAClient from a NetworkConfig.CAInfo using default crypto suite. @param caInfo created from NetworkConfig.getOrganizationInfo("org_name").getCertificateAuthorities() @return HFCAClient @throws MalformedURLException @throws InvalidArgumentException
[ "Create", "HFCAClient", "from", "a", "NetworkConfig", ".", "CAInfo", "using", "default", "crypto", "suite", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L322-L331
22,079
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.createNewInstance
public static HFCAClient createNewInstance(NetworkConfig.CAInfo caInfo, CryptoSuite cryptoSuite) throws MalformedURLException, InvalidArgumentException { if (null == caInfo) { throw new InvalidArgumentException("The caInfo parameter can not be null."); } if (null == cryptoSuite) { ...
java
public static HFCAClient createNewInstance(NetworkConfig.CAInfo caInfo, CryptoSuite cryptoSuite) throws MalformedURLException, InvalidArgumentException { if (null == caInfo) { throw new InvalidArgumentException("The caInfo parameter can not be null."); } if (null == cryptoSuite) { ...
[ "public", "static", "HFCAClient", "createNewInstance", "(", "NetworkConfig", ".", "CAInfo", "caInfo", ",", "CryptoSuite", "cryptoSuite", ")", "throws", "MalformedURLException", ",", "InvalidArgumentException", "{", "if", "(", "null", "==", "caInfo", ")", "{", "throw...
Create HFCAClient from a NetworkConfig.CAInfo @param caInfo created from NetworkConfig.getOrganizationInfo("org_name").getCertificateAuthorities() @param cryptoSuite the specific cryptosuite to use. @return HFCAClient @throws MalformedURLException @throws InvalidArgumentException
[ "Create", "HFCAClient", "from", "a", "NetworkConfig", ".", "CAInfo" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L343-L356
22,080
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.register
public String register(RegistrationRequest request, User registrar) throws RegistrationException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (Utils.isNullOrEmpty(request.getEnrollmentID())) { ...
java
public String register(RegistrationRequest request, User registrar) throws RegistrationException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (Utils.isNullOrEmpty(request.getEnrollmentID())) { ...
[ "public", "String", "register", "(", "RegistrationRequest", "request", ",", "User", "registrar", ")", "throws", "RegistrationException", ",", "InvalidArgumentException", "{", "if", "(", "cryptoSuite", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException",...
Register a user. @param request Registration request with the following fields: name, role. @param registrar The identity of the registrar (i.e. who is performing the registration). @return the enrollment secret. @throws RegistrationException if registration fails. @throws InvalidArgumentException
[ "Register", "a", "user", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L376-L410
22,081
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.info
public HFCAInfo info() throws InfoException, InvalidArgumentException { logger.debug(format("info url:%s", url)); if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } setUpSSL(); try { JsonObjectBuilder factory...
java
public HFCAInfo info() throws InfoException, InvalidArgumentException { logger.debug(format("info url:%s", url)); if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } setUpSSL(); try { JsonObjectBuilder factory...
[ "public", "HFCAInfo", "info", "(", ")", "throws", "InfoException", ",", "InvalidArgumentException", "{", "logger", ".", "debug", "(", "format", "(", "\"info url:%s\"", ",", "url", ")", ")", ";", "if", "(", "cryptoSuite", "==", "null", ")", "{", "throw", "n...
Return information on the Fabric Certificate Authority. No credentials are needed for this API. @return {@link HFCAInfo} @throws InfoException @throws InvalidArgumentException
[ "Return", "information", "on", "the", "Fabric", "Certificate", "Authority", ".", "No", "credentials", "are", "needed", "for", "this", "API", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L534-L596
22,082
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.reenroll
public Enrollment reenroll(User user, EnrollmentRequest req) throws EnrollmentException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (user == null) { throw new InvalidArgumentException("ree...
java
public Enrollment reenroll(User user, EnrollmentRequest req) throws EnrollmentException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (user == null) { throw new InvalidArgumentException("ree...
[ "public", "Enrollment", "reenroll", "(", "User", "user", ",", "EnrollmentRequest", "req", ")", "throws", "EnrollmentException", ",", "InvalidArgumentException", "{", "if", "(", "cryptoSuite", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", ...
Re-Enroll the user with member service @param user User to be re-enrolled @param req Enrollment request with the following fields: hosts, profile, csr, label @return enrollment @throws EnrollmentException @throws InvalidArgumentException
[ "Re", "-", "Enroll", "the", "user", "with", "member", "service" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L620-L673
22,083
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.revoke
public void revoke(User revoker, Enrollment enrollment, String reason) throws RevocationException, InvalidArgumentException { revokeInternal(revoker, enrollment, reason, false); }
java
public void revoke(User revoker, Enrollment enrollment, String reason) throws RevocationException, InvalidArgumentException { revokeInternal(revoker, enrollment, reason, false); }
[ "public", "void", "revoke", "(", "User", "revoker", ",", "Enrollment", "enrollment", ",", "String", "reason", ")", "throws", "RevocationException", ",", "InvalidArgumentException", "{", "revokeInternal", "(", "revoker", ",", "enrollment", ",", "reason", ",", "fals...
revoke one enrollment of user @param revoker admin user who has revoker attribute configured in CA-server @param enrollment the user enrollment to be revoked @param reason revoke reason, see RFC 5280 @throws RevocationException @throws InvalidArgumentException
[ "revoke", "one", "enrollment", "of", "user" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L685-L687
22,084
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.revoke
public void revoke(User revoker, String serial, String aki, String reason) throws RevocationException, InvalidArgumentException { revokeInternal(revoker, serial, aki, reason, false); }
java
public void revoke(User revoker, String serial, String aki, String reason) throws RevocationException, InvalidArgumentException { revokeInternal(revoker, serial, aki, reason, false); }
[ "public", "void", "revoke", "(", "User", "revoker", ",", "String", "serial", ",", "String", "aki", ",", "String", "reason", ")", "throws", "RevocationException", ",", "InvalidArgumentException", "{", "revokeInternal", "(", "revoker", ",", "serial", ",", "aki", ...
revoke one certificate @param revoker admin user who has revoker attribute configured in CA-server @param serial serial number of the certificate to be revoked @param aki aki of the certificate to be revoke @param reason revoke reason, see RFC 5280 @throws RevocationException @throws InvalidArgumentException
[ "revoke", "one", "certificate" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L847-L849
22,085
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.generateCRL
public String generateCRL(User registrar, Date revokedBefore, Date revokedAfter, Date expireBefore, Date expireAfter) throws InvalidArgumentException, GenerateCRLException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } i...
java
public String generateCRL(User registrar, Date revokedBefore, Date revokedAfter, Date expireBefore, Date expireAfter) throws InvalidArgumentException, GenerateCRLException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } i...
[ "public", "String", "generateCRL", "(", "User", "registrar", ",", "Date", "revokedBefore", ",", "Date", "revokedAfter", ",", "Date", "expireBefore", ",", "Date", "expireAfter", ")", "throws", "InvalidArgumentException", ",", "GenerateCRLException", "{", "if", "(", ...
Generate certificate revocation list. @param registrar admin user configured in CA-server @param revokedBefore Restrict certificates returned to revoked before this date if not null. @param revokedAfter Restrict certificates returned to revoked after this date if not null. @param expireBefore Restrict certificat...
[ "Generate", "certificate", "revocation", "list", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L926-L977
22,086
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.getHFCAIdentities
public Collection<HFCAIdentity> getHFCAIdentities(User registrar) throws IdentityException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } logger.debug(format("identity url: %s, registrar: %s", url, re...
java
public Collection<HFCAIdentity> getHFCAIdentities(User registrar) throws IdentityException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } logger.debug(format("identity url: %s, registrar: %s", url, re...
[ "public", "Collection", "<", "HFCAIdentity", ">", "getHFCAIdentities", "(", "User", "registrar", ")", "throws", "IdentityException", ",", "InvalidArgumentException", "{", "if", "(", "registrar", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "("...
gets all identities that the registrar is allowed to see @param registrar The identity of the registrar (i.e. who is performing the registration). @return the identity that was requested @throws IdentityException if adding an identity fails. @throws InvalidArgumentException Invalid (null) argument specified
[ "gets", "all", "identities", "that", "the", "registrar", "is", "allowed", "to", "see" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L1000-L1035
22,087
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.getHFCAAffiliations
public HFCAAffiliation getHFCAAffiliations(User registrar) throws AffiliationException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (registrar == null) { throw new InvalidArgumentException("...
java
public HFCAAffiliation getHFCAAffiliations(User registrar) throws AffiliationException, InvalidArgumentException { if (cryptoSuite == null) { throw new InvalidArgumentException("Crypto primitives not set."); } if (registrar == null) { throw new InvalidArgumentException("...
[ "public", "HFCAAffiliation", "getHFCAAffiliations", "(", "User", "registrar", ")", "throws", "AffiliationException", ",", "InvalidArgumentException", "{", "if", "(", "cryptoSuite", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Crypto primit...
gets all affiliations that the registrar is allowed to see @param registrar The identity of the registrar (i.e. who is performing the registration). @return The affiliations that were requested @throws AffiliationException if getting all affiliations fails @throws InvalidArgumentException
[ "gets", "all", "affiliations", "that", "the", "registrar", "is", "allowed", "to", "see" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L1055-L1084
22,088
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.getHFCACertificates
public HFCACertificateResponse getHFCACertificates(User registrar, HFCACertificateRequest req) throws HFCACertificateException { try { logger.debug(format("certificate url: %s, registrar: %s", HFCA_CERTIFICATE, registrar.getName())); JsonObject result = httpGet(HFCA_CERTIFICATE, registr...
java
public HFCACertificateResponse getHFCACertificates(User registrar, HFCACertificateRequest req) throws HFCACertificateException { try { logger.debug(format("certificate url: %s, registrar: %s", HFCA_CERTIFICATE, registrar.getName())); JsonObject result = httpGet(HFCA_CERTIFICATE, registr...
[ "public", "HFCACertificateResponse", "getHFCACertificates", "(", "User", "registrar", ",", "HFCACertificateRequest", "req", ")", "throws", "HFCACertificateException", "{", "try", "{", "logger", ".", "debug", "(", "format", "(", "\"certificate url: %s, registrar: %s\"", ",...
Gets all certificates that the registrar is allowed to see and based on filter parameters that are part of the certificate request. @param registrar The identity of the registrar (i.e. who is performing the registration). @param req The certificate request that contains filter parameters @return HFCACertificateRespons...
[ "Gets", "all", "certificates", "that", "the", "registrar", "is", "allowed", "to", "see", "and", "based", "on", "filter", "parameters", "that", "are", "part", "of", "the", "certificate", "request", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L1224-L1254
22,089
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java
HFCAClient.httpPost
String httpPost(String url, String body, UsernamePasswordCredentials credentials) throws Exception { logger.debug(format("httpPost %s, body:%s", url, body)); final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); CredentialsProvider provider = null; if (credentials != n...
java
String httpPost(String url, String body, UsernamePasswordCredentials credentials) throws Exception { logger.debug(format("httpPost %s, body:%s", url, body)); final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); CredentialsProvider provider = null; if (credentials != n...
[ "String", "httpPost", "(", "String", "url", ",", "String", "body", ",", "UsernamePasswordCredentials", "credentials", ")", "throws", "Exception", "{", "logger", ".", "debug", "(", "format", "(", "\"httpPost %s, body:%s\"", ",", "url", ",", "body", ")", ")", ";...
Http Post Request. @param url Target URL to POST to. @param body Body to be sent with the post. @param credentials Credentials to use for basic auth. @return Body of post returned. @throws Exception
[ "Http", "Post", "Request", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAClient.java#L1266-L1337
22,090
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java
HFCAIdentity.read
public int read(User registrar) throws IdentityException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readIdURL = ""; try { readIdURL = HFCA_IDENTITY + "/" + enrollmentID; ...
java
public int read(User registrar) throws IdentityException, InvalidArgumentException { if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); } String readIdURL = ""; try { readIdURL = HFCA_IDENTITY + "/" + enrollmentID; ...
[ "public", "int", "read", "(", "User", "registrar", ")", "throws", "IdentityException", ",", "InvalidArgumentException", "{", "if", "(", "registrar", "==", "null", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Registrar should be a valid member\"", ")",...
read retrieves a specific identity @param registrar The identity of the registrar (i.e. who is performing the registration). @return statusCode The HTTP status code in the response @throws IdentityException if retrieving an identity fails. @throws InvalidArgumentException Invalid (null) argument specified
[ "read", "retrieves", "a", "specific", "identity" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java#L198-L243
22,091
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java
HFCAIdentity.create
public int create(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
java
public int create(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
[ "public", "int", "create", "(", "User", "registrar", ")", "throws", "IdentityException", ",", "InvalidArgumentException", "{", "if", "(", "this", ".", "deleted", ")", "{", "throw", "new", "IdentityException", "(", "\"Identity has been deleted\"", ")", ";", "}", ...
create an identity @param registrar The identity of the registrar (i.e. who is performing the registration). @return statusCode The HTTP status code in the response @throws IdentityException if creating an identity fails. @throws InvalidArgumentException Invalid (null) argument specified
[ "create", "an", "identity" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java#L254-L287
22,092
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java
HFCAIdentity.update
public int update(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
java
public int update(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
[ "public", "int", "update", "(", "User", "registrar", ")", "throws", "IdentityException", ",", "InvalidArgumentException", "{", "if", "(", "this", ".", "deleted", ")", "{", "throw", "new", "IdentityException", "(", "\"Identity has been deleted\"", ")", ";", "}", ...
update an identity @param registrar The identity of the registrar (i.e. who is performing the registration). @return statusCode The HTTP status code in the response @throws IdentityException if adding an identity fails. @throws InvalidArgumentException Invalid (null) argument specified
[ "update", "an", "identity" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java#L298-L331
22,093
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java
HFCAIdentity.delete
public int delete(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
java
public int delete(User registrar) throws IdentityException, InvalidArgumentException { if (this.deleted) { throw new IdentityException("Identity has been deleted"); } if (registrar == null) { throw new InvalidArgumentException("Registrar should be a valid member"); ...
[ "public", "int", "delete", "(", "User", "registrar", ")", "throws", "IdentityException", ",", "InvalidArgumentException", "{", "if", "(", "this", ".", "deleted", ")", "{", "throw", "new", "IdentityException", "(", "\"Identity has been deleted\"", ")", ";", "}", ...
delete an identity @param registrar The identity of the registrar (i.e. who is performing the registration). @return statusCode The HTTP status code in the response @throws IdentityException if adding an identity fails. @throws InvalidArgumentException Invalid (null) argument specified
[ "delete", "an", "identity" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric_ca/sdk/HFCAIdentity.java#L342-L375
22,094
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.generateDirectoryHash
public static String generateDirectoryHash(String rootDir, String chaincodeDir, String hash) throws IOException { // Generate the project directory Path projectPath = null; if (rootDir == null) { projectPath = Paths.get(chaincodeDir); } else { projectPath = Paths....
java
public static String generateDirectoryHash(String rootDir, String chaincodeDir, String hash) throws IOException { // Generate the project directory Path projectPath = null; if (rootDir == null) { projectPath = Paths.get(chaincodeDir); } else { projectPath = Paths....
[ "public", "static", "String", "generateDirectoryHash", "(", "String", "rootDir", ",", "String", "chaincodeDir", ",", "String", "hash", ")", "throws", "IOException", "{", "// Generate the project directory", "Path", "projectPath", "=", "null", ";", "if", "(", "rootDi...
Generate hash of a chaincode directory @param rootDir Root directory @param chaincodeDir Channel code directory @param hash Previous hash (if any) @return hash of the directory @throws IOException
[ "Generate", "hash", "of", "a", "chaincode", "directory" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L95-L130
22,095
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.generateTarGz
public static byte[] generateTarGz(File sourceDirectory, String pathPrefix, File chaincodeMetaInf) throws IOException { logger.trace(format("generateTarGz: sourceDirectory: %s, pathPrefix: %s, chaincodeMetaInf: %s", sourceDirectory == null ? "null" : sourceDirectory.getAbsolutePath(), pathPrefix...
java
public static byte[] generateTarGz(File sourceDirectory, String pathPrefix, File chaincodeMetaInf) throws IOException { logger.trace(format("generateTarGz: sourceDirectory: %s, pathPrefix: %s, chaincodeMetaInf: %s", sourceDirectory == null ? "null" : sourceDirectory.getAbsolutePath(), pathPrefix...
[ "public", "static", "byte", "[", "]", "generateTarGz", "(", "File", "sourceDirectory", ",", "String", "pathPrefix", ",", "File", "chaincodeMetaInf", ")", "throws", "IOException", "{", "logger", ".", "trace", "(", "format", "(", "\"generateTarGz: sourceDirectory: %s,...
Compress the contents of given directory using Tar and Gzip to an in-memory byte array. @param sourceDirectory the source directory. @param pathPrefix a path to be prepended to every file name in the .tar.gz output, or {@code null} if no prefix is required. @param chaincodeMetaInf @return the compressed directo...
[ "Compress", "the", "contents", "of", "given", "directory", "using", "Tar", "and", "Gzip", "to", "an", "in", "-", "memory", "byte", "array", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L141-L217
22,096
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.readFile
public static byte[] readFile(File input) throws IOException { return Files.readAllBytes(Paths.get(input.getAbsolutePath())); }
java
public static byte[] readFile(File input) throws IOException { return Files.readAllBytes(Paths.get(input.getAbsolutePath())); }
[ "public", "static", "byte", "[", "]", "readFile", "(", "File", "input", ")", "throws", "IOException", "{", "return", "Files", ".", "readAllBytes", "(", "Paths", ".", "get", "(", "input", ".", "getAbsolutePath", "(", ")", ")", ")", ";", "}" ]
Read the contents a file. @param input source file to read. @return contents of the file. @throws IOException
[ "Read", "the", "contents", "a", "file", "." ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L226-L228
22,097
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.deleteFileOrDirectory
public static void deleteFileOrDirectory(File file) throws IOException { if (file.exists()) { if (file.isDirectory()) { Path rootPath = Paths.get(file.getAbsolutePath()); Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.re...
java
public static void deleteFileOrDirectory(File file) throws IOException { if (file.exists()) { if (file.isDirectory()) { Path rootPath = Paths.get(file.getAbsolutePath()); Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.re...
[ "public", "static", "void", "deleteFileOrDirectory", "(", "File", "file", ")", "throws", "IOException", "{", "if", "(", "file", ".", "exists", "(", ")", ")", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "Path", "rootPath", "=", "Path...
Delete a file or directory @param file {@link File} representing file or directory @throws IOException
[ "Delete", "a", "file", "or", "directory" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L256-L271
22,098
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.combinePaths
public static String combinePaths(String first, String... other) { return Paths.get(first, other).toString(); }
java
public static String combinePaths(String first, String... other) { return Paths.get(first, other).toString(); }
[ "public", "static", "String", "combinePaths", "(", "String", "first", ",", "String", "...", "other", ")", "{", "return", "Paths", ".", "get", "(", "first", ",", "other", ")", ".", "toString", "(", ")", ";", "}" ]
Combine two or more paths @param first parent directory path @param other children @return combined path
[ "Combine", "two", "or", "more", "paths" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L294-L296
22,099
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java
Utils.readFileFromClasspath
public static byte[] readFileFromClasspath(String fileName) throws IOException { InputStream is = Utils.class.getClassLoader().getResourceAsStream(fileName); byte[] data = ByteStreams.toByteArray(is); try { is.close(); } catch (IOException ex) { } return data;...
java
public static byte[] readFileFromClasspath(String fileName) throws IOException { InputStream is = Utils.class.getClassLoader().getResourceAsStream(fileName); byte[] data = ByteStreams.toByteArray(is); try { is.close(); } catch (IOException ex) { } return data;...
[ "public", "static", "byte", "[", "]", "readFileFromClasspath", "(", "String", "fileName", ")", "throws", "IOException", "{", "InputStream", "is", "=", "Utils", ".", "class", ".", "getClassLoader", "(", ")", ".", "getResourceAsStream", "(", "fileName", ")", ";"...
Read a file from classpath @param fileName @return byte[] data @throws IOException
[ "Read", "a", "file", "from", "classpath" ]
4a2d7b3408b8b0a1ed812aa36942c438159c37a0
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/helper/Utils.java#L305-L313