BufferedReader doesn't read the whole file.

Hi,
I am reading a text file using this piece of code:
BufferedReader in = new BufferedReader("C:\\ServerOut.txt");
String str;
while((str = in.readLine()) != null) {
System.out.println(str);
}The problem is that not the whole file is being read. I do not understand why?
Please help.

Looks fine to me (assuming that that's a valid file name and it's at least reading some of the file).
There must be something else going on--maybe whatever's writing the file hasn't finished, or maybe there are control characters in there that are messing up the display on your DOS prompt window.

Similar Messages

  • File adapter didn't read the whole file

    Hi folks,
    we use the file adapter since 1 year and in the majority of cases it works fine. But sometimes the file adapter didn't read the whole file. In SAP we are missing some parts. Funnily enough in this cases he archive the whole file and not only the executed parts . Know anybody whats the reason of this effect and how we can solve it?
    Kind regards Johann M.

    Johann
    I think you miss understood me/I didn;t explain myself very well....
    If you take the file that doesn't work/process correctly, can you replicate the issue where the whole file is not copied across.
    If you can, you should be able to extend the FTP/File adapter trace file to find the cause if this issue.
    Log onto Visual Admin.
         Services
         Log Configurator
         Locations
         Choose the location (Java package) and the tracing level (severity)
    (for example, com.sap.aii.adapter.file)
         Root Location > com > sap > aii > File
         Set the severity and choose Copy Severity to Subtree
    Run interface and then check the trace file - remember to switch this back to Error...

  • Apperture doesn't read the RAW files from my new Camera

    Hi, Apperture doesn't read the RAW files downloaded from my new Camera Fujifilm X-S1. What options do I have to work with .RAF (Fujifilm RAW)?
    I was thinking about using RAW Converter PRO but it cannot upload the full information contained into the RAF file. Maybe there is another Program I can use until Aperture includes my camera in its DB.
    Greats!

    I've been a loyal Apple user for 20 years and have been using Aperture for the last 2 years. The X-pro came out a YEAR ago and still no x-trans sensor support and yet Lightroom by Adobe and Capture One now has RAW support.I've had to switch to the Lightroom trial as I have a busy studio in hope that Apple might bother with me but again no reply to my emails.
    If I have to purchase Lightroom I will probably not come back to Aperture which is a shame
    Apple seem to have got too big for good customer service these days unless it's an iPhone or iPad
    I

  • Why doesn't read the RTF file?

    Hello,
    Could anyone tell me what is the problem with the following code. It would
    read an 'rtf' file but it doesn't.
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.rtf.*;
    import java.io.*;
    import java.awt.event.*;
    public class Rtf extends JFrame {
    String filein = System.getProperty("user.dir")
    + System.getProperty("file.separator")
    + "BG.rtf";
    public Rtf() {
         RTFEditorKit rtfKit = new RTFEditorKit();
         DefaultStyledDocument doc = new DefaultStyledDocument();
         try {
              rtfKit.read( new FileInputStream( filein ), doc, 0 );
         } catch(Exception e) {
              System.out.println("Read error: " + e);
         System.out.println("doc.getLength: " + doc.getLength());
    public static void main(String[] args) {
    JFrame frame = new Rtf();
    During the execution the following lines are the result:
    Read error: java.lang.NullPointerException
    doc.getLength: 0
    Press any key to continue...
    Thank you in advance.

    If your rtf is made in word 2000 or newer version, rtf kit cannot read it and return null pointer statement

  • How to see the whole file names in finder column view?

    Hi guys,
    I like to use finder in column view. However, most of the times, the file names get trunked and I have to redim the column to see the whole names. Other day, without wanting to, I must have pressed some key combination, and the column got redim automatically, so I could read the whole file names. So, my question is if does anybody know how to achieve this?

    I don't know what "redim" means, but if you double-click the column separator, it becomes wide enough for the longest name. If you Option-double-click it, all columns become wide enough for the longest name in each column.

  • Cfspreadsheet and reading the xlsx files issue

    I am trying to process large excel files (65,000 rows) into the DB.  So I try to use the new cfspreadsheet tag to read in the files by 5000 rows at a time and then process the query into the tables.  The process is working fine when reading the (pre 2003 format "xls" files) but not when reading the new "xlsx" type of files.  The server is running out of memory trying to read those files for some reason.  Is this a known bug in ColdFusion 9.0??  Has anyone experiansed similar issues?
    Thanks

    if it's a POI issue (not likely, admittedly), of CF's
    usage thereof.
    If you check the POI archives, you should see a LOT of memory issues with large xlsx files. Usually related to how the file is processed. IIRC the standard way of loading a spreadsheet ie new XSSFWorkbook(name) just reads the whole file into memory in one shot. So with all the bloated xml and parsing going on it is very prone to OOM errors.
    For big files, they actually recommend using the event api instead, because of its lower footprint. I used it a couple months ago for a side project and it made a huge difference!  I did some basic profiling and the standard method (usermodel) was definitely more prone to big spikes in memory and oom errors. In contrast, memory usage with event api was far lower and more stable.
    Reason for bringing this all of this up ...? Well depending on how CF actually reads/loads spreadsheets internally, maybe the problem is a little bit of both .. ?  Just my $0.02
    -Leigh
    Message was edited by: -==cfSearching==-

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • How to close a jmf rtp session when the whole file is sent

    i am using jmf to Stream a video file from a one client to another, everything seems to be working fine except for the fact that i dont know how to close the prosessor and the session/datasink on the transmitting clients side when the clientis done streaming, i can close it lets say after 60 seconds of starting but i am not able to figure out how make it stop when the whole file is done streaming. i tried using the datasinklistner while sending the video and the following code
    public void dataSinkUpdate(DataSinkEvent event) {
             if (event instanceof javax.media.datasink.EndOfStreamEvent) {
                 endOfStream = true;
         }but the endofstream event is never received from the datasource.
    the problem is that it works fine if i using a 20 second video and i close the datasink and the processor in 60 seconds, the whole file does get streamed but if i have a file longer than 60 seconds then the file just gets cut at 60 seconds.
    i also tried to use a sessionmanager with a sessionlistener and a sendStreamListener and the following code
         * SessionListener.
        public synchronized void update(SessionEvent evt) {
         * SendStreamListener
        public synchronized void update( SendStreamEvent evt) {
            System.out.println(evt);
         if (evt instanceof InactiveSendStreamEvent) {
              flag=true;
              System.out.println("done");
         if (evt instanceof ActiveSendStreamEvent) {
             System.out.println("start");
        }i ran the whole code and sent files and everything but neither an activestreamevent nor a inactivestreamevent happens but the file is being streamed properly

    user13490676 wrote:
    could it be a problem with jmf itself that the endofstream doesnt get generated for the datasource being read from a fileIn this instance, that would be the problem... more than likely, there's something weird about the file, perhaps it doesn't have a duration set in the header and JMF treats it like a live stream.
    You could always write a custom DataSource that just passes through the input of a normal data source, and then generate the EndOfStream event yourself... maybe based on a timeout or failure counter? I haven't received any data in x seconds or after x attempts, so I'm assuming the file is done... Or when you've read enough data that the file can't possibly have any more (read >= file header + file data)...

  • I tried to delete one item from an email folder, and my computer deleted the whole file. I cant fint it anywhere.

    I tried to delete one item from an email folder, my computer deleted the whole file and I cant find it anywhere. Any ideas?

    lindafromgainesville wrote:
    ...is there a seperate trash for email?
    In Mail, yes -

  • Doesn't open the PDF file (i.e. articles, books pages). It appears a black page. Thanks for help

    Safari doesn't open the PDF file (articles, book page, etc). It appears a black page. Before that it was working perfectly. Thank for your help

    Try this ...
    Open a Finder window then from the menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/Internet Plug-Ins
    Click Go.
    If you see the:  AdobePDFViewer plugin (or anything Adobe related) in the Internet Plug-Ins folder, move it to the trash.
    Restart your Mac and try opening a PDF file.

  • How can I make the first page of a PDF load before the whole file on a website

    I work for a company that loads they brochures in PDF format on their website and the PDF's were formerly created in Indesign and converted.
    When the files were  viewed on the website, the first page loaded right away while the others loaded. Now I have created an interactive PDf with buttons in Fireworks, but when I convert the file to PDF and load it on the web, the first page does not load until the whole file loads which is about 5MB.
    My employer likes the buttons and interactivity, but does not want teh customer sitting there for a few minutes looking at an empty screen while the whole file loads to view.
    Does anyone know what I mean? I could use some help.
    Thanks!

    Make sure that fast web view is enabled.

  • How can I read the bootstrap files and extract the fragment-URLs and fragment-numbers in plain text?

    How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
    Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh  f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
    Thank you!

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • Hi im having huge problems trying to install flash for my mac 10.5 imac, iv gone through the internet and tried all of the solutions, everytime i try to install flash it says cant read the download file, or it just wont install, anybody plz help!

    hi im having huge problems trying to install flash for my mac 10.5 imac, iv gone through the internet and tried all of the solutions, everytime i try to install flash it says cant read the download file, or it just wont install, anybody plz help!
    iv unistalled flash, iv checked plug ins it just wont work,

    It would have been a great help to know precisely what Mac you have, so some of the following may not apply:
    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version,10.3.183.23 or later, is for Intel Macs only running Tiger or Leopard, as Adobe no longer support the PPC platform. Version 11.4.402.265 or later is for Snow Leopard onwards.
    (If you are running Mavericks: After years of fighting malware and exploits facilitated through Adobe's Flash Player, the company is taking advantage of Apple's new App Sandbox feature to restrict malicious code from running outside of Safari in OS X Mavericks.)
    * Unhelpfully, if you want the last version for PPC (G4 or G5) Macs, you need to go here:  http://kb2.adobe.com/cps/142/tn_14266.html  and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here:  http://kb2.adobe.com/cps/838/cpsid_83808.html
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications (including Safari) first before installing. You must also carry out a permission repair after installing anything from Adobe.
    After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. If you are running 10.6.8 or later:
    When you have installed the latest version of Flash, relaunch Safari and test.
    If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
    click Check Now. Quit and relaunch your browser.
    You can also try these illustrated instructions from C F McBlob to perform a full "clean install", which will resolve the "Blocked Plug-in" message when trying to update via the GUI updater from Adobe.
    Use the FULL installer for 12.0.0.44:  Flash Player 12 (Mac OS X)
    And the instructons are here: Snow Leopard Clean Install.pdf
    (If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, try the following solution which fools the site into thinking that you are running the version 11.5.502.55:)
    Download this http://scriptogr.am/nordkril/post/adobe-flash-11.5-for-powerpc to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work.

  • Is DocumentBuilder.parse(..) reading the whole XML into memory?

    Hello,
    I have a quick question about the following code snippet:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document doc = builder.parse("books.xml");Please have a look at the last line "builder.parse("books.xml");". I would like to use XPath to retrieve some informations of a xml file without having to deserialize the whole file (since the XML file rather big and I need to go through several of them in a loop).
    What exactly does the "builder.parse(...)" method? Is it reading the XML file and writing all the content to memory? Or does it only analyze and read the structure of the XML code? Or in other words, is the text of an element "//books/title" in memory after parsing, or not until I really access the "title" node of that XML?
    Thanks a lot for your help
    Best Regards,
    Ben

    Hi ,
    I did'nt knew how to start a new thread , so i am asking the question here:
    ===========================================================
    I am trying to read a xml file but i am not able to do so properly. I am new to xml .
    am trying to read a xml file of the following format in the staf and stax job xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <operating_system>
    <unix_80sp1>
    <tests type="quick_sanity_test">
    <prerequisitescript>preparequicksanityscript</prerequisitescript>
    <acbuildpath>acbuildpath</acbuildpath>
    <testsuitscript>test quick sanity script</testsuitscript>
    <testdir>quick sanity dir</testdir>
    </tests>
    <machine_name>u80sp1_L004</machine_name>
    <machine_name>u80sp1_L005</machine_name>
    <machine_name>xyz.pxy.dxe.cde</machine_name>
    <vmware id="155.35.3.55">144.35.3.90</vmware>
    <vmware id="155.35.3.56">144.35.3.91</vmware>
    </unix_80sp1>
    </operating_system>
    Here machine_name tag can be n number. I need to read all the machine_name tags in an array , so that i can use them later.
    Also i need to read all the vmware tags in an array (both value and attributes) so that i can use them later. The number of vmware tags can again be n numbers.
    I am trying to use the following code :
    <!-- ******************************************************************* -->
    <!-- Following function is used to parse an XML file and return the DOM -->
    <!-- document object -->
    <!-- ******************************************************************* -->
    <function name="parseXML" scope="local">
    <function-list-args>
    <function-required-arg name="xmlFileName">
    Name of file containing XML to be parsed
    </function-required-arg>
    </function-list-args>
    <sequence>
    <!-- Parse the XML -->
    <script>
    factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(1)
    factory.setIgnoringElementContentWhitespace(0)
    builder = factory.newDocumentBuilder()
    document = builder.parse(xmlFileName)
    </script>
    <script>
    vmware = None
    machine_name = None
    # Get the text value for the element with tag name "vmware"
    nodeList = document.getElementsByTagName("vmware")
    for i in range(nodeList.getLength()):
    node = nodeList.item(i)
    if node.getNodeType() == Node.ELEMENT_NODE:
    children = node.getChildNodes()
    for j in range(children.getLength()):
    thisChild = children.item(j)
    if (thisChild.getNodeType() == Node.TEXT_NODE):
    machine_name = thisChild.getNodeValue()
    # Get the text value for the element with tag name "machine_name"
    nodeList = document.getElementsByTagName("vmware")
    for i in range(nodeList.getLength()):
    node = nodeList.item(i)
    if node.getNodeType() == Node.ELEMENT_NODE:
    children = node.getChildNodes()
    for j in range(children.getLength()):
    thisChild = children.item(j)
    if (thisChild.getNodeType() == Node.TEXT_NODE):
    machine_name = thisChild.getNodeValue()
    </script>
    <return>[machine_name,vmware]</return>
    </sequence>
    </function>
    I am able to read only one value for machine_name (u80sp1_L005) and also one value for vmware
    i.e 144.35.3.91.
    What i want is read all the machine_value tags into a list , so that i can use it later
    Also i want to read all the vmware tags attributes into a list and all corresponding values into another list.
    what i mean is considering the following:_
    <machine_name>u80sp1_L004</machine_name>
    <machine_name>u80sp1_L005</machine_name>
    <machine_name>xyz.pxy.dxe.cde</machine_name>
    <vmware id="155.35.3.55">144.35.3.90</vmware>
    <vmware id="155.35.3.56">144.35.3.91</vmware>
    read all machine_name tag values into one list (u80sp1_L004,u80sp1_L005,xyz.pxy.dxe.cde)
    also all vmware attributes into one list *(155.35.3.55,155.35.3.56).....*and all the vmware values into one list *(144.35.3.90,144.35.3.91)*
    Also a good link to understand parsing using doumentbilder factory would be good help.
    Regards
    Sangram
    mail: [email protected]

  • Why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please.  Thanks?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

Maybe you are looking for

  • Dynamic file name within 1:n mapping

    Dear all, I have a 1:n mapping and would like to use dynamic file names. I searched the forum but found just some few anserws. As far as I can determine, it is not possible to use dynamic file names for multiple target messages, right? We are using a

  • How to resolve hostname in Common Service 3.3 ?

    hi guys! i have a problem when discover my devices in ciscoworks common service 3.3. i discovered use module setting cdp and ping sweep , preferred dcr name is hostname, and update dcr display name is checked. i hope the hostname is show in display n

  • How to unhide the column in Alv table

    Hi Experts,     Initially i have created webdynpro Alv table with 8 columns ,later i have added one more attribute/column to the node to display extra column but in the output ,alv table not displaying the 9th column,Instead the column is getting hid

  • AdobePDFMakerForOffice in Microsoft Visio

    I gather from rummaging in these forums that AdobePDFMakerForOffice is not officially supported so I'll throw this to the community and hope someone has a suggestion. With Acrobat XI installed, the following VBA code works correctly in Microsoft Word

  • Tcode SU25 has been executed in Dev

    Hello Gurus, The tcode SU25 has been executed one of our contractors in Development system (ECC 6.0).  He executed the following steps: 1. step 2B. compare affected transactions 2. step 2C. Roles to be checked 3. Check indicator (Transaction SU24) I