Message5687
Alan, I think what Philip wants is a simpler wrapper function that moves the name of the object into the PyFile object. The name is what is printed out in Java when you pass the object to System.out.println.
Here is a possible fix:
FileUtil.java:
public static PyFile wrap(InputStream is, String mode, int bufsize) {
return new PyFile(is, mode, bufsize);
}
This would have a corresponding PyFile entry, which would call the PyFile entry from the patch:
PyFile.java:
public PyFile(InputStream istream, String mode, int bufsize) {
PyFile(istream, "<Java InputStream '" + istream + "' as file>", mode, bufsize, true)
}
Note 1: I took the liberty of adding bufsize to the wrapper function, as most of the other wrapper functions in FileUtil have bufsize, so I assume it's something people want often.
Note 2: I didn't compile or try this, so please don't just check it in, try it. |
|
Date |
User |
Action |
Args |
2010-04-12 22:51:29 | jfenwick | set | messageid: <1271112689.02.0.386463376479.issue1549@psf.upfronthosting.co.za> |
2010-04-12 22:51:29 | jfenwick | set | recipients:
+ jfenwick, amak, leosoto, pjenvey |
2010-04-12 22:51:28 | jfenwick | link | issue1549 messages |
2010-04-12 22:51:28 | jfenwick | create | |
|