阅读背景:

在构造函数中模拟File对象参数以使用inputstream

来源:互联网 

I have an class, that I cannot modify, and this class contains one constructor which requires a java.io.File. I already have the information loaded from a different source and currently it is in memory. So I want to know if there is a way to mock the java.io.File object in such a way that is uses the information that is already in memory. I know I could first store the information from memory to disk, but I don't like that extra step.I have an class, that I cannot modify, and this




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: