X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2FFileBasedMailbox.java;fp=src%2Forg%2Fibex%2Fmail%2FFileBasedMailbox.java;h=e13e22dea9a4632b482d54af885473af023eed8f;hb=2a1d65e90e0dbae298a366fdf865b0025d7b15ed;hp=2a614d7bab19c9c536b56622f3b7abd8f4821f0b;hpb=31f6bfd3b57924e8c3d506592132e91e73145462;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/FileBasedMailbox.java b/src/org/ibex/mail/FileBasedMailbox.java index 2a614d7..e13e22d 100644 --- a/src/org/ibex/mail/FileBasedMailbox.java +++ b/src/org/ibex/mail/FileBasedMailbox.java @@ -180,22 +180,8 @@ public class FileBasedMailbox extends Mailbox.Default { else if (f.lastModified()==MAGIC_DATE) f.setLastModified(System.currentTimeMillis()); // FIXME } - public Headers head() { - if (done()) return null; - FileInputStream fis = null; - try { - return new Headers.Original(new Stream(new FileInputStream(file()))); - } catch (IOException e) { throw new MailException.IOException(e); - } finally { if (fis != null) try { fis.close(); } catch (Exception e) { /* DELIBERATE */ } } - } - public Message cur() { - FileInputStream fis = null; - try { - return Message.newMessage(new Fountain.File(file())); - //} catch (IOException e) { throw new MailException.IOException(e); - } catch (Message.Malformed e) { throw new MailException(e.getMessage()); - } finally { if (fis != null) try { fis.close(); } catch (Exception e) { /* DELIBERATE */ } } - } + public Headers head() { return done() ? null : new Headers(new Fountain.File(file())); } + public Message cur() { return Message.newMessage(new Fountain.File(file())); } } public static class Servlet extends HttpServlet {