Article View: borland.public.jbuilder.java.api
Article #1688format printing - MessageFormat?
From: Shawn
Date: Thu, 04 Oct 2001 16:17
Date: Thu, 04 Oct 2001 16:17
14 lines
1373 bytes
1373 bytes
I am trying to figure out how to format printing in Java using an API similar to C's fprintf. MessageFormat is the closest thing I've found, however it doesn't seem to do exactly what I need (or at least I can't figure out how to make it do it). What I need is to print fixed width records to a file, for example in C I'd write: fprintf(fp, "%-30s\n", szString); Please point me in the correct direction... a code example would also be greatly appreciated! Thanks in advance, Shawn
Technical Details
Message-ID:
<9pi1u1$hsr$1@slb1.atl.mindspring.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,580c84f31c2f0d2b,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-10-04 09:15:25 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: "Shawn" <sstarkey@mindspring.com> Newsgroups: borland.public.jbuilder.java.api Subject: format printing - MessageFormat? Date: Thu, 4 Oct 2001 12:17:35 -0400 Organization: MindSpring Enterprises Lines: 17 Message-ID: <9pi1u1$hsr$1@slb1.atl.mindspring.net> NNTP-Posting-Host: a5.f7.45.95 X-Server-Date: 4 Oct 2001 16:14:57 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200