我正在尝试使用eclipse:JPBC ABE中使用的JPBC库运行基于属性的加密示例。当我运行代码时,我得到以下错误
@RequestMapping(value = "menu9data", method = RequestMethod.POST)
public JSONObject view(@RequestPart(name = "file", required = false) MultipartFile image,@Valid MenuData model, BindingResult results) {
String name1;
FFmpegFrameGrabber g = new FFmpegFrameGrabber("/home/anupam/Downloads/"+name1); //Error
g.setFormat("mp4");
try {
System.out.println("enterss");
g.start();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
for (int i = 0 ; i < 1 ; i++) {
/* try {
// ImageIO.write(((Object) g.grab()).getBufferedImage(), "png", new File("/home/anupam/Downloads/"+name1+"snap"));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
}
try {
g.stop();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
我已经包含了所有必要的库。我该怎么办呢?
代码:
Exception in thread "main" java.lang.RuntimeException: java.io.EOFException
at it.unisa.dia.gas.plaf.jpbc.util.io.PairingStreamReader.readString(PairingStreamReader.java:93)
at it.unisa.dia.gas.crypto.jpbc.fe.abe.gghvv13.engines.GGHVV13KEMEngine.process(GGHVV13KEMEngine.java:45)
at it.unisa.dia.gas.crypto.jpbc.cipher.PairingAsymmetricBlockCipher.processBlock(PairingAsymmetricBlockCipher.java:88)
at it.unisa.dia.gas.crypto.jpbc.kem.PairingKeyEncapsulationMechanism.processBlock(PairingKeyEncapsulationMechanism.java:37)
at com.crypto.GGHVV13KEM.decaps(GGHVV13KEM.java:83)
at com.crypto.GGHVV13KEM.main(GGHVV13KEM.java:124)
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(Unknown Source)
at java.io.DataInputStream.readUTF(Unknown Source)
at java.io.DataInputStream.readUTF(Unknown Source)
at it.unisa.dia.gas.plaf.jpbc.util.io.PairingStreamReader.readString(PairingStreamReader.java:91)
... 5 more