Streamwriter output different as Out-File

Hello,
I have a script where I write value's to an file with Out-File:
"<<<local>>>" | Out-File $NagiosLogFile -Append -encoding ASCII
$Export_W3SVC | Out-File $NagiosLogFile -Append -encoding ASCII
$Export_App_Pool | Out-File $NagiosLogFile -Append -encoding ASCII
$Export_IIS_Site | Out-File $NagiosLogFile -Append -encoding ASCII
$Export_NetTCP_8093 | Out-File $NagiosLogFile -Append -encoding ASCII
$Export_IIS_Read_File | Out-File $NagiosLogFile -Append -encoding ASCII
"" | Out-File $NagiosLogFile -Append -encoding ASCII
The output  at file is:
<<<local>>>
0 PolyOP_service_W3SVC - Der W3SVC Service is running
0 PolyOP_ApplPool_ZWACMESBGHCON_Client - Application Pool PolyOP_ApplPool_ZWACMESBGHCON_Client is running
0 PolyOP_ApplPool_ZWACMESBGHCON_Server - Application Pool PolyOP_ApplPool_ZWACMESBGHCON_Server is running
0 PolyOP_WebSite_ZWACMESBGHCON_Client - IIS Site PolyOP_WebSite_ZWACMESBGHCON_Client is running
0 PolyOP_WebSite_ZWACMESBGHCON_Server - IIS Site PolyOP_WebSite_ZWACMESBGHCON_Server is running
0 PolyOP_Net_TCP_Port_8093_more_then_one_time - TCP Port 8093 is only set once at this server
0 PolyOP_Read_File_EMSDeploy_Folder - EMS Deploy directory can be read from this server
The other script methode is - streamwriter:
$sw = new-object system.IO.StreamWriter($NagiosLogFile, "True", [System.Text.Encoding]::Ascii)
$sw.writeline("<<<local>>>")
$sw.writeline($Export_W3SVC)
$sw.writeline($Export_App_Pool)
$sw.writeline($Export_IIS_Site)
$sw.writeline($Export_NetTCP_8093)
$sw.writeline($Export_IIS_Read_File)
$sw.writeline("")
$sw.close()
The output is:
<<<local>>>
0 PolyOP_service_W3SVC - Der W3SVC Service is running
System.Object[]
System.Object[]
0 PolyOP_Net_TCP_Port_8093_more_then_one_time - TCP Port 8093 is only set once at this server
0 PolyOP_Read_File_EMSDeploy_Folder - EMS Deploy directory can be read from this server
The values for $Export_App_Pool and $Export_IIS_Site are arrays - script part:
$DateTime = (Get-Date -Format yyyy.MM.dd-hh:mm:ss)
$nagios_State = "0"
$ServiceName = "ApplPool_"+$item.Name
$Export_App_Pool1 = "$nagios_State PolyOP_$ServiceName - Application Pool PolyOP_$ServiceName is running"
$Export_App_Pool += $Export_App_Pool1
$Export_App_Pool = @($Export_App_Pool)
What is the problem?
I Hope somebody can help me,
Thanks Horst MOSS 2007 Farm; MOSS 2010 Farm; TFS 2010; IIS 7.5

Hello,
thank you it works but I have now a new line in the log file, what I doesn't need.
<<<local>>>
0 PolyOP_service_W3SVC - Der W3SVC Service is running
0 PolyOP_ApplPool_ZWACMESBGHPRO_Client - Application Pool PolyOP_ApplPool_ZWACMESBGHPRO_Client is running
0 PolyOP_ApplPool_ZWACMESBGHPRO_Server - Application Pool PolyOP_ApplPool_ZWACMESBGHPRO_Server is running
0 PolyOP_WebSite_ZWACMESBGHPRO_Client - IIS Site PolyOP_WebSite_ZWACMESBGHPRO_Client is running
0 PolyOP_WebSite_ZWACMESBGHPRO_Server - IIS Site PolyOP_WebSite_ZWACMESBGHPRO_Server is running
0 PolyOP_Net_TCP_Port_8093_more_then_one_time - TCP Port 8093 is only set once at this server
0 PolyOP_Read_File_EMSDeploy_Folder - EMS Deploy directory can be read from this server
 How can I remove this line after this two arrays?
Thanks Horst MOSS 2007 Farm; MOSS 2010 Farm; TFS 2010; IIS 7.5

Similar Messages

  • Output Data to CSV File with headers

    So I'm trying to create a powershell script that outputs a list of computers with their default printers. Here's what I have to far:
    cls
    $obj = New-Object PSObject
    $ComputerList = Import-CSV C:\test\PCList.csv
    ForEach ($Computer in $ComputerList)
        $DefaultPrinter = Get-WmiObject -Query "select * from Win32_Printer where Default=True"
        $DefaultPrinterName = $DefaultPrinter.ShareName
            $obj | Add-Member WorkstationName $Computer.Name -Force
            $obj | Add-Member DefaultPrinter $DefaultPrinterName -Force
        Write-Output -InputObject $obj | Out-File -FilePath C:\test\PCList_defaultprinter.csv -Append
    It's not formatting the CSV in a workable format. What I'd like is to have 2 columns (Workstation Name and Default Printer Name) but it's not exactly doing that.
    Any help would be greatly appreciated!!!

    Use Export-CSV instead of Out-File, as in:
    cls
    $obj = New-Object PSObject
    $ComputerList = Import-CSV C:\test\PCList.csv
    ForEach ($Computer in $ComputerList)
    $DefaultPrinter = Get-WmiObject -Query "select * from Win32_Printer where Default=True"
    $DefaultPrinterName = $DefaultPrinter.ShareName
    $obj | Add-Member WorkstationName $Computer.Name -Force
    $obj | Add-Member DefaultPrinter $DefaultPrinterName -Force
    $obj | Export-Csv -Path C:\test\PCList_defaultprinter.csv -NoTypeInformation -Append
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • How to merge five different xml input files into three output files

    Hi All,
    Can you please explain me to merge 5 different xml input files into 3 output xml files.
    I'm looking forward for ur suggestions...
    Thanks
    Pullarao

    HI
    Please see the below links
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/62/dcef46dae42142911c8f14ca7a7c39/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    Many other examples can be found under the following link at help.sap.com
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    And some weblogs
    https://weblogs.sdn.sap.com/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken]
    /people/siva.maranani/blog/2005/05/22/schedule-your-bpm *****
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    /people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
    /people/michal.krawczyk2/blog/2005/09/04/xi-do-you-realy-enjoy-clicking-and-waiting-while-tracing-bpm-steps *****
    /people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements *****
    /people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure
    /people/kannan.kailas/blog/2005/12/07/posting-multiple-idocs-with-acknowledgement
    Also have a look at these seminars,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c6d54e02
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37bec4706cc
    <b>BPM CollectPattern..</b>
    http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    Thanks !
    Regards
    Abhishek Agrahari
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>

  • Modify .out file

    hi all
    when i run a concurrent program an output file is created at some location in server, it is in the form of orequestid.out
    there are certain characters in the .out file which needs to be deleted can anyone tell me what i need to do to achieve this functionality.
    the modified file should be moved to different directory in the server
    thanks for the response
    regards
    jdev.

    The following links should be helpful:
    Note: 156636.1 - How to Register a Host Concurrent Program in Applications
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=156636.1
    Note: 266268.1 - How To Create a Custom Concurrent program with Host Method and Pass Parameters to the shell script
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=266268.1
    Note: 412392.1 - How Do You Run A Unix Host Script From Concurrent Managers On MS Windows Platform?
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=412392.1

  • Dates appear different in log file vs. debug page for Deferred Task

    I added a deferred task and in the log file, the date appeared correctly as
    Mon Dec 15 16:34:11 PST 2008
    But when I viewed the user in the debug page, the date appeared as
    <Date>2008-12-16T00:34:11.430Z</Date>
    I called an external java class that return a Date object
    <Action id='0' application='com.waveset.session.WorkflowServices'>
    <Argument name='op' value='addDeferredTask'/>
    <Argument name='date'>
    <invoke name='addWeekDays' class='MyDateUtil'/>
    </Argument>
    </Action>
    Do you have any ideas?

    IDM commonly stores dates in a Java or JDBC date format (which is what your debug date is) but often formats the date differently for log files and for web pages. It's annoying if you're trying to line two different outputs up.

  • "Try Selecting a Different Printer or File Type" Error - iPad2 - Officejet Pro 8600 - ePrint error

    Greetings...
    I just got an Officejet Pro 8600 and I've been trying to get web pages to print using HP ePrint from my iPad 2 (iOS 7.0.6). I go into the ePrint app, go to web page of choice, and then click on my printer option to print. It renders on screen and then throws out the following error:
    "Try Selecting a Different Printer or File Type" "Officejet Pro 8600 [5124FC] doesn't support this file type."
    I can use ePrint from the iPad to print pictures from camera roll.
    This only is problematic when I try to print web pages (I tried amazon.com for test).
    I have no problems doing this from my iPhone...only the iPad.
    I've tried rebooting device and trying again....same thing.
    Anybody know how to fix this? I really want to be able to print web pages from my iPad.
    Thanks in advance...
    Possie

    Hello Possie,
    Thank you for the update.  I have to say I'm surprised and disappointed that the uninstall and reinstall did not resolve the issue, especially since you can print the page from your iPhone.
    I have spent some time researching this and working with my colleagues in HP's Cloud Services and we have a couple of suggestions/questions.
    Do you get the same error when you try to print the web page using Apple's AirPrint feature? 
    Please ensure the iPad is connect to your home wireless network and try to print again.
    Please try changing the settings in the ePrint app before printing the web page.  Please ensure that the paper quality is set to normal (see screen shot below) and that the paper size is set to letter (see 2nd screen shot below).
    Please let us know how it goes. 
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • Editing XMP metadata in Bridge for checked-out files?

    Our custom connector does not implement the WRITE_XMP_METADATA Capability because we do not want to change the XMP of a file in our DAM system without checking in a new file version.
    However, when a file is checked out through Adobe Drive, we would expect to be able to edit its XMP metadata in Bridge just like we can for local files.
    It looks like this is still not possible with Adobe Drive 3, i.e. if your connector does not implement the WRITE_XMP_METADATA Capability you cannot edit XMP for checked out files either.
    It seems weird that you can edit XMP metadata for checked out files with regular CS applications but not with Bridge. Is this something that is expected to be fixed in a future version?
    Thanks

    In our design, editing XMP data in Bridge and in regular CS applications is different, the former one will be routed to SetXMPHandler in you connector, in the latter case, CS applications take the normal file writting ways to embed XMP data in the file content.
    The purpose of this design is to offer similar user experience for normal users when they edit XMP data for AD assets and local file assets, they don't need to check-out files first.
    To address your issue, I think you can add some codes in SetXMPHandler to auto check-out files before real XMP operation, and check-in them before exiting the handler
    We will consider to make some enhancements for this part, that's, to allow editng XMP data for the checked-out files in Br, in the next release, thanks for this advice.

  • Execute command and save output in a HTML File

    Hello Guys,
    I have a requirement and for that i have to do following. a) read a file in an array and then execute a command for each value in that array. after that i want to store the output of command and value of array in another array.
    i am doing something like below.
    set objtextfile = objfso.opentextfile _
    ("c:\temp\aaaa.txt", forreading)
    j=0
    Do until objtextfile.atendofstream
    redim preserve arr123(j)
    arr123(j) = objtextfile.readline
    j = j+1
    Loop
    for each server in arr123
    chk_status = "command" &" "& server
    set objexecobject = objshell.exec(chk_status)
    'Here i am not sure how to proceed further to achieve what i described above.
    Next
    Can someone help me with this?
    -KAKA-

    Thank you for your response.
    So here is what i want to do.
    Query a database using odbc from my management server (odbc is configured and connection is tested) and based on the query it will result out few list of servers. then from the same management server i want to execute a command against all the resulted server
    (management server has a binary which can execute remote action). this remote action will get output back.
    then i would like to store the name of server and resulte output in a html file which should look like below.
    which i will later host on apache.
    YOu do not need to move things in and out of arrays and files.
    >>>> You are right but as i stated, i am not a core programmer and due to nature of my job i have to work on perl, shell and VB Script, apart from my actual technology so it becomes difficult to write it with perfection.
    I hope you understand.
    -KAKA-
    -KAKA-

  • Why won't excel read my csv file created with the powersell out-file automatically.

    I wrote a PowerShell script that creates a CSV formatted file.  The script simply creates a comma delimited string for each entry and adds it to a collection.  Then the out-file command write it to a file.
    When you open it with Excel each line is put into one cell.  If you import the file and specify the "," as the delimiter, it imports just fine.  If the data is saved out again as a csv file,  the file is about half the size and opens
    just fine with excel.
    If you open the original file and the file created by Excel with notepad, they look the same.
    So the files are different in size, contents look the same, but Excel won't automatically open the original file.
    Any ideas of why this happens?  Also PowerShell and Excel are both running on Server 2012 R2.  Excel is a remote app.
    If I do an export-CSV, I get some kind of information about the object.
    Here is the script:
    foreach ($group in $groups)
       $header += '"' + $group.name + '",'
       $CSVdata = @()
       $CSVdata += $header
       # Create a user entry
       $users = Get-ADUser -filter * |select SamAccountname, Name | sort SamAccountName
       foreach ($user in $users)
          $Groupmembership = Get-ADPrincipalGroupMembership -Identity $user.SamAccountName
          $userentry = '"' + $user.SamAccountName + '",'
          $user
          foreach ($group in $groups)
              if ($Groupmembership.SamAccountName -contains $group.SamAccountName) { $userentry += '"X",'}
              else { $userentry += '"",' }
           $CSVdata += $userentry
          $CSVdata
          Out-File -inputobject $CSVdata -FilePath c:\batch\GroupMembership.csv

    Ok the script works exactly like I want it.  Thank you very much.
    I am trying to understand the script but I am unable to figure out what the line "$keys=$t.Keys|%{$_}"
    does.  I figured ".keys" was a method but my search for it comes up blank.  Do you have a reference you can point me to?  

  • Win 2008  WL 10.3.3 stdout appearing in .log and .out files

    Recently noticed a ballooning [ServerName].out file in the logs directory. In weblogic management console I do have it configured to redirect stdout and stderr to weblogic logging (.log file). Both the .log and .out file contain the same stdout/stderr information. I would like to eliminate the .out file if possible (since WL only rotates the .log), but cannot find where it is configured. The managed servers are NOT windows services (no -log option).
    Did not find any logging parameters in JAVA_OPTIONS or paramters in the startManagedSvc.cmd file.
    Is this something needing to be corrected at the application level? (log4j)

    opie wrote:
    Recently noticed a ballooning [ServerName].out file in the logs directory. In weblogic management console I do have it configured to redirect stdout and stderr to weblogic logging (.log file). Both the .log and .out file contain the same stdout/stderr information. I would like to eliminate the .out file if possible (since WL only rotates the .log), but cannot find where it is configured. The managed servers are NOT windows services (no -log option).
    Did not find any logging parameters in JAVA_OPTIONS or paramters in the startManagedSvc.cmd file.
    Is this something needing to be corrected at the application level? (log4j)Depends on what you are actually seeing in those files. Are you outputting log4j messages to a log file AND the console?
    Here is a snippet of the log4j configuration file that denotes writing to the console:
        <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d{yyyy-MM-dd hh:mm:ss} %-5p [%t] - %C{1}.%M -> %m%n" />
            </layout>
          </appender>
        <root>
            <level value="ALL" />
            <appender-ref ref="ConsoleAppender" />
        </root>Edited by: ForumKid2 on Dec 29, 2010 11:36 AM

  • Classpath/Datatype restriction/Output XML to a file

    Hi,
    I was trying to use a webservice but because the service could not identify the
    classes needed to run the service it is giving me an exception.If only i give
    the directory(temp staging directory-which is in my d drive but not within the
    default directory where we have installed the weblogic6.1)in the classpath of
    the system environment variable am i able to access the service.Is there any default
    directory where i can store all of the EJB,supporting classes to run this webservice?
    2.Also the datatypes are restricted and a clear mention of arrays(single array
    only),iam trying to use String array but when iam creating the ear file using
    Ant iam getting and exception
    wsgen:
    Error at line:8 col:12 ':' Already got a ':' in name
    at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseExcepti
    on(SAXElementFactory.java:60)
    at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXML
    EventStream.java:28)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java
    :1125)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285
    at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.jav
    a:1418)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    at org.apache.tools.ant.Main.runBuild(Main.java:421)
    at org.apache.tools.ant.Main.main(Main.java:149)
    3.while trying to use this service the output being generated is written to the
    console.Could we direct this output XML to a file and if so what steps needs to
    be followed in the client program(java)?
    Could anybody sort out these issues?Thanks in advance.
    Nandula

    If you're trying to do this through sql*plus then just use 'spool'. If you need a pure pl/sql solution you'll need to use UTL_FILE.
    Richard

  • Out-file -encoding default

    When utsing out-file to send output to a text file, in order not the get the BOM (Byte Order Marker) I have to use the form
    out-file -Encoding default .   Why is the default not the default?

    The default for Out-File is Unicode.
    EDIT: See here for more details:
    http://technet.microsoft.com/en-us/library/hh849882.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Cannot Check Out files in DreamWeaver 5.5

    I have several websites hosted by the same company. Now when I use DreamWeaver 5.5 to visit these sites, I can see the files on the server and I can see my local files. But when viewing local files, I need to be able to Check Out files, edit them, save them and then check them back in so they get uploaded to the server.
    In my current state, the Check Out File(s) icon is grayed out.
    Thanks!

    Go to Site > Manage Sites and choose the one you want to add Check In/Out to.
    Go under the Basic tab and hit Next until you get to "Do you want to enable checking in and checking out..." switch the radio button to Yes.
    Note: this is how you would turn it on in DWCS4, I'm assuming 5 isn't much different.

  • DW CS3 cross-platform check in/out file locking

    Here is my setup:
    * Apple X-Serve file server (as a mapped drive on several
    Windows XPsp2
    machines and a shared drive on one Mac 10.4)
    * Up-to-date Dreamweaver CS3 on every machine (3 windows, 1
    mac)
    * Enable file check in and check out (site preference for all
    installations)
    * Contribute compatibility (site preference for all
    installations)
    The problem is that when a file is checked in on the mac, the
    file becomes
    locked such that the windows machines can't check out the
    file. All of the
    windows machines check out and check in files with no problem
    if the mac hasn't
    touched them. Once the mac has checked in a file, I have to
    "unlock" the file
    via the right-click context menu on the file. (This unlock is
    called "Turn off
    Read Only" on the windows version.)
    Windows FTP Log on check out after mac check in:
    /.../public_html/help/faq.php - locked
    /.../public_html/help/faq.php - error occurred - An FTP error
    occurred -
    cannot get faq.php.
    /.../public_html/help/faq.php - unlocked
    Apparently the Mac DW CS3 version of "Check in" and the
    Windows DW CS3 version
    of "Check in" are different and incompatible. Has anyone else
    had this problem
    or know of a solution? Removing the Mac is not an option.
    This may or may not be related, but whenever a file is opened
    on the operating
    system other than last edited (mac opens windows edited file
    or windows opens
    mac edited file), the "Overwrite local copy" dialog shows up
    when checking out
    a file. When a compare is made of the server/local files,
    there are no changes.
    Both mac and windows have the same line ending settings in
    the preferences.
    http://www.hostingforum.ca/700363-cs3-cross-platform-check-out-file-locking.html
    I'm having exactly the same issue. Has anyone experienced
    this before, and if so have a solution?
    Thanks in advance!

    In your Site definition, you need to specify the Remote Info
    of your
    server, and then "Enable file checkin and checkout".
    HTH,
    Randy
    djdeel wrote:
    > I am unable to check out a file using the context menu
    when right clicking on the file.

  • How get output generated as csv file  by reading  by buffered reader and wr

    how get output generated as csv file by reading by buffered reader and writer

    String file_location = "C\temp\csv.txt");
    try {
         URL fileURL = getClass().getResource(file_location);
         if (fileURL != null){
              BufferedReader br = new BufferedReader(new InputStreamReader(fileURL.openStream()));
              String s = br.readLine();
              while (s != null)  {
                   if (!s.equals ("")) {
                        System.out.println(s);
                   s = br.readLine();
              br.close();
         else {
              // error
    catch (IOException ex){ex.printStackTrace();}rykk
    Message was edited by: a dummy
    rykk.

Maybe you are looking for