@Test(expected = IOException.class) public void testPolicyCtorFile() throws IOException { ChaincodeEndorsementPolicy policy = new ChaincodeEndorsementPolicy(); policy.fromFile(new File("/does/not/exists")); }
public void fromFile(File policyFile) throws IOException { InputStream is = new FileInputStream(policyFile); policyBytes = IOUtils.toByteArray(is); }
ChaincodeEndorsementPolicy { public void fromFile(File policyFile) throws IOException { InputStream is = new FileInputStream(policyFile); policyBytes = IOUtils.toByteArray(is); } }
ChaincodeEndorsementPolicy { public void fromFile(File policyFile) throws IOException { InputStream is = new FileInputStream(policyFile); policyBytes = IOUtils.toByteArray(is); } ChaincodeEndorsementPolicy(); }
ChaincodeEndorsementPolicy { public void fromFile(File policyFile) throws IOException { InputStream is = new FileInputStream(policyFile); policyBytes = IOUtils.toByteArray(is); } ChaincodeEndorsementPolicy(); void fromFile(File policyFile); void fromYamlFile(File yamlPolicyFile); void fromStream(InputStream inputStream); void fromBytes(byte[] policyAsBytes); byte[] getChaincodeEndorsementPolicyAsBytes(); }
ChaincodeEndorsementPolicy { public void fromFile(File policyFile) throws IOException { InputStream is = new FileInputStream(policyFile); policyBytes = IOUtils.toByteArray(is); } ChaincodeEndorsementPolicy(); void fromFile(File policyFile); void fromYamlFile(File yamlPolicyFile); void fromStream(InputStream inputStream); void fromBytes(byte[] policyAsBytes); byte[] getChaincodeEndorsementPolicyAsBytes();  }