Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: [Windows] Any way to distinguish ^C Induced EOF from ^Z EOF? Date: Tue, 13 Mar 2012 14:17:35 +0100 Organization: albasani.net Lines: 36 Message-ID: References: <4f5d18ef$0$291$14726298@news.sunsite.dk> <4f5d239d$0$293$14726298@news.sunsite.dk> <4f5e8d1f$0$290$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net gqVtRo6i70i3V54Z4Q95A/D5lBgoCekgX2eGd714jpPMiRs0GXFeLDoWRY6olE7vr1q+jGaaECK45857pMRV59QOYPvWa0rqxMnBW0nvvKyKsPAai3Ei9hUx/2t2sjri NNTP-Posting-Date: Tue, 13 Mar 2012 13:17:34 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="mAWqMgiFQ6zKukvzdW4SWIgJiurAp6MNrS3rEiOs6i0LN6iagWeHjjdEvIxJ1Ydji25rdEAXcv4Ndf40rrLHZjObBlB4f8+xc5wYZoP9ZwHW7nMVInfn5UFsK1KK2n0/"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2 In-Reply-To: Cancel-Lock: sha1:crZmlnve2JizikV1I6q7c2QXypA= Xref: csiph.com comp.lang.java.programmer:12953 Patricia Shanahan schrieb: > I've found that general strategy useful for dealing with other > specialized activities that are not directly supported in Java. For > example, I needed some intense matrix manipulation that was not > supported well in any library I found, but was trivial in Matlab. The > combination of a Java program with a very small Matlab program did > everything I needed. Hi, Using a loosely coupled solution (i.e. two processes or so) is only second priority. First priority is a fully integrated solution. Something along: public class FileInputStreamFix extends FileInputStream; I alreay tried subclassing FileInputStream. Works fine. For example I experimented with a public class FileInputStreamTest1 extends FileInputStream { public void close() throws IOException { /* do nothing */ } } By the above you get a file input stream that cannot be closed. I noticed that some JNA solutions bundle a DLL inside the resources of the application. At runtime they then unpack/download this resource to a local location and invoke loadLibrary(). So I guess a fully integrated solution should be possible that carries its own Windows specific code. Best Regards