Help on Java question (IO stream)

To all Java programmers:
Hi there!
Currently, I am using DataOuputStream and FileOutputStream to write to a file.
May I know how to keep on adding the contents of the file without deleting it or overriding it.
E.g. Supposing the file I am writing to is a .txt file and the contents of the txt file is:
I am
May I know how to continue adding the line:
a Java programmer
Please post the codes here.
Thanks!

Hi,
Read in the contents of the file in a buffer and append the desired text to it.Then rewrite the content back to the same file .
Its simple FileReader and FileWriter class usage.
Sorry for not posting the code.
thx.

Similar Messages

  • Please help with java.io.IOException:  Stream closed

    Hello friends --
    I have some code that dies when I try to read in a line:
    import java.sql.*;
    import java.io.*;
    public class MyClass
    public static void main(String[] args)
    try /*wrapper*/
    File inFile = new File(args[0]);
    BufferedReader in = new BufferedReader(new FileReader(inFile));
    File outFile = new File(args[1]);
    BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
    String line = new String();
    Connection con = null;
    try /*try 1. read file*/
    while ((line = in.readLine()) != null)
    // lots more code here
    The code dies when it hits the while(). What's wrong? Didn't I open the stream when I declared 'in'? Thanks a heap to anyone willing to share a clue!!!

    It's a relative path....I figured out exactly what was wrong. The program reads the first line, then dies on its second time through because I've closed the connections. Where should I close the connections and stuff?
    Here's the rest of the code:
    import java.sql.*;
    import java.io.*;
    public class UpdateClaims
    public static void main(String[] args)
    try /*wrapper*/
    File inFile = new File(args[0]);
    BufferedReader in = new BufferedReader(new FileReader(inFile));
    File outFile = new File(args[1]);
    BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
    String line = new String();
    Connection con = null;
    try /*try 1. read file*/
    while ((line = in.readLine()) != null)
    String path = line.substring(0, line.indexOf("~"));
    String size = line.substring(line.indexOf("~")+1);
    String icn = line.substring(line.lastIndexOf("/")+1, line.indexOf("~"));
         String table = "k" + line.substring(line.lastIndexOf("/")-5, line.lastIndexOf("/"));
    try /*2. update existing table*/
    // do some stuff
    }//end try 2
    catch (Exception e1) /*1. update fails*/
         try /*3. insert into existing table*/
    //do some stuff
    }//end try 3
    catch (Exception e2)/*2. insert fails*/
    try /*4. create table and insert record*/
    //do some stuff
    }//end try 4
    catch (Exception e3)/*3. table creation and insertion fails*/
    e3.printStackTrace();
    /*print record to file*/
    out.write(line);
    }//end catch 3
         }//end catch 2
    }//end catch 1
    }//end while
    in.close();
    out.close();
    con.close();
    }//end try 1
    catch (Exception e5) {e5.printStackTrace();}
    }//end wrapper try
    catch (Exception ew) {ew.printStackTrace();}
    }//end main()
    }//end MyClass

  • Can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market

    can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market

    Java is no longer included in Mac OS X by default. If you want Java, you will have to install it.
    However, note that you should think twice before installing Java for such a trivial need as looking at stock market quotes. There are other ways to get that information that don't involve Java, and using Java in your web browser is a HUGE security risk right now. Java has been vulnerable to attack almost constantly for the last year, and has become a very popular, frequently used method for getting malware installed via "drive-by downloads." You really, truly don't want to be using it. See:
    Java is vulnerable… Again?!
    http://java-0day.com

  • Java Question... please help

    I am running  Snow Leopard  (mac os x version 10.6.8)
    For the past couple of years I've played gin in yahoo games.  
    Yesterday when I entered the gin lobby ...the font was so tiny
    I wasn't able to read it.   I checked Java on my computer and
    it is enabled, however I just realized when I go into the gin
    lobby... there is no java icon on the dock.   Since the font size
    is fine in all other applications, I am presuming this is a Java
    issue.  
    Help if you are able.. please and thanks

    Huh? Is this a Java question? Where's the Java? I just see a little JavaScript. Do you know how to use servlets and JSPs?
    Jesper

  • Help.....Java Question

    I am new at learning Java, I need some help. My question is I have 2 numbers either can be zero or both, the quotient will be reported as zero and no division should actually be done. Otherwise, the quotient should be computed so the it is >=1 (divide the larger number by the smaller). How can I do this?

    You can find some pointers to general Java help at http://forum.java.sun.com/thread.jsp?forum=54&thread=151766
    Is this what you're looking for?
        public double func(double a, double b) {
            if (a == 0.0 || b == 0.0)
                return 0.0;
            if (a > b)
                return Math.abs(a / b);
            else
                return Math.abs(b / a);
        }

  • Help please!     java.io.IOException: Stream closed

    When I run my webapp under Tomcat5.5, it works fine, but I got the following Exception in Tomcat stdout.log:
    2005.04.19. 15:54:47 org.apache.jasper.runtime.PageContextImpl release
    WARNING: Internal error flushing the buffer in release()
    2005.04.19. 15:54:47 org.apache.catalina.core.StandardWrapperValve invoke
    WARNING: Servlet.service() for servlet jsp threw exception
    java.io.IOException: Stream closed
         at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
         at org.apache.jasper.runtime.JspWriterImpl.clearBuffer(JspWriterImpl.java:159)
         at org.apache.jsp.pages.tree_jsp._jspService(org.apache.jsp.pages.tree_jsp:58)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:534)I dont have an idea why did my webapp throw this. I got it when I logged in the webapp. I cant find the root problem, because there is no a word from my package in the exception-list above. What happened?
    Thanks in advance.

    SEVERE: Servlet.service() for servlet jsp threw exception
    java.io.IOException: Stream closed
         at org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
         at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)
         at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
         at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
         at org.apache.jsp.accSubAccount_jsp._jspService(accSubAccount_jsp.java:244)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)It is in JSP, I was just quoting that looking into error stack I opened genrated java file accSubAccount_jsp.java at line 244 and came to know that this file has only 196 lins.
    At successfull submission I am opening a page through javascript window.location directive, probably it may be the reason?

  • Help with java mapping

    PI File adapter has a processing option u2018Empty-Message Handlingu2019 to ignore or Write Empty Files. In case there is no data created after mapping on target side then this option determines whether to write an empty file or not. But there is a catch to this option when it comes to using it with File Content Conversion which is described in SAP Note u2018821267u2019. It states following:
    I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory?  Example of such a payload generated from mapping is as follows:                                                           
    <?xml version="1.0" encoding="UTF-8"?>                          
    <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>
    solution :
    If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done:
    Using a Java or ABAP Mapping in order to restrict the creation of node itself during mapping. (This cannot be achieved via Message Mapping)
    Using standard adapter modules to do content conversion first and then write file. 
    can someone help with java mapping that can be used in this case?

    Hi,
        You have not mentioned the version of PI you are working in. In case you are working with PI 7.1 or above then here is the java mapping code you need to add after message mapping in the same interface mapping
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class RemoveRootNode extends AbstractTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    public void transform(TransformationInput arg0, TransformationOutput arg1)
              throws StreamTransformationException {
         // TODO Auto-generated method stub
         this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    In case you are working in PI 7.0 you can use this code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class RemoveRootNode implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
         throws StreamTransformationException {
    // TODO Auto-generated method stub
    try
         DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
         DocumentBuilder builderel=factory.newDocumentBuilder();
         /*input document in form of XML*/
         Document docIn=builderel.parse(in);
         /*document after parsing*/
         Document docOut=builderel.newDocument();
         TransformerFactory tf=TransformerFactory.newInstance();
         Transformer transform=tf.newTransformer();
         if(docIn.getDocumentElement().hasChildNodes())
              docOut.appendChild(docOut.importNode(docIn.getDocumentElement(),true));
              transform.transform(new DOMSource(docOut), new StreamResult(out));
         else
              out.write(null);
    catch(Exception e)
    public void setParameter(Map arg0) {
    // TODO Auto-generated method stub
    public static void main(String[] args) {
    // TODO Auto-generated method stub
    try{
         RemoveRootNode genFormat=new RemoveRootNode();
         FileInputStream in=new FileInputStream("C:\\apps\\sdn\\rootNode.xml");
         FileOutputStream out=new FileOutputStream("C:\\apps\\sdn\\rootNode1.xml");
         genFormat.execute(in,out);
         catch(Exception e)
         e.printStackTrace();
    The code for PI 7.0 should also work for PI 7.1 provided you use the right jar files for compilation, but vice-versa is not true.
    Could you please let us know if this code was useful to you or not?
    Regards
    Anupam
    Edited by: anupamsap on Dec 15, 2011 9:43 AM

  • Need help in Java Script

    i Need some help in Java Script,
    am using the following code :
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus) {newwindow.focus()}
    else {newwindow.close()}
    //     if (window.focus) {newwindow.focus()}
    </script>
    In HTML,
    thWorld Environment
    Day, June 5<sup>th</sup>,2005
    Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
    but according to the above code, the new window is opened but have to close it manually....
    Is there any other way to close the popup when my mouse is out of the link

    Prawn,
    This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
    Please kindly take your question to an appropriate JavaScript forum.
    Have a happy day.
    Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201

  • Axis Client Web Service call problem: java.io.IOException: Stream closed

    Hi, I tried to call a webservice from Axis Client, and I encounter the following error. Do you guys have any idea what actually happens?
    Please help, I am newbie in web services.
    ==============Root Cause===============
    AxisFault
    faultCode: { h t t p : / / schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.io.IOException: Stream closed
    faultActor:
    faultNode:
    faultDetail:
         {h t t p : / / xml.apache.org/axis/}stackTrace:java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
         {h t t p : / / xml.apache.org/axis/}hostname:compname
    java.io.IOException: Stream closed
         at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:301)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
         at org.apache.axis.client.Call.invoke(Call.java:2767)
         at org.apache.axis.client.Call.invoke(Call.java:2443)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)     
    Caused by: java.io.IOException: Stream closed
         at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
         at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:127)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:688)
         at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString(HttpMethodBase.java:796)
         at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:224)
         ... 17 more  I am calling through proxy, the setting is as follows:
                System.setProperty("https.proxyHost", [proxyname here]);
                System.setProperty("https.proxyPort", [proxyport here]);
                System.setProperty("http.proxyHost", [proxyname here]);
                System.setProperty("http.proxyPort", [proxyport here]);

    Are there any problems showing up in the server's log?

  • Help with java translator...PLEASE!!!

    I am currently in the process of learning the JAVA language.
    i am having real problems tackling a question about programming a translator, can anyone help with this question?
    - Write a Java class 'German' to model the german dictionary(using only a few phrases, say 4-5). You will need to choose an appropriate representation for the constant dictionary(ignore accents etc), and to provide a method 'Translate' that, given an English phrase, returns the corresponding German phrase. You must also deal with phrases that are not available.
    I hope someone can help...
    John

    Learn a Map structure.

  • Migrating from JavaHelp to Oracle Help for Java

    Currently we have a product in which we have implemented Sun Microsystem's JavaHelp as the Help delivery system. However, after evaluating Oracle Help for Java we would like to migrate from Javahelp to OHJ.
    My question is, how difficult would this migration be from the Development side? I have been reviewing the Oracle Help for Java Developer's Guide and comparing it against the JavaHelp documentation but I haven't been able to get a clear idea of how different the implementation is.
    Thanks,
    Theresa

    Hello Theresa,
    Thanks for considering Oracle Help.
    There isn't much you have to do with your source content and control files. With the exception of the full text search index, the Oracle Help control file formats (helpset, index, map, etc.) extend the JavaHelp formats. So you can use the JavaHelp control files as is, or you can extend them with the Oracle Help extensions. For a quick overview of differences, see the following page in the Oracle Help Guide:
    1. Go to http://otn.oracle.com/ohguide/help/.
    2. Click "Oracle Help File Formats."
    3. Click "Comparision to Javahelp File Formats."
    To create an Oracle Help full text search index, run through the Helpset Authoring Wizard and remove the existing JavaHelp search view and have the wizard generate an Oracle Help Search index
    on the following wizard page. For the Helpset Authoring Wizard doc:
    1. Go to http://otn.oracle.com/ohguide/help/.
    2. Click "Authoring Oracle Help Systems."
    3. Click "Using the HelpSet Authoring Wizard."
    Alternatively, change the helpset file by hand. For the doc:
    1. Go to http://otn.oracle.com/ohguide/help/.
    2. Click "Oracle Help File Formats."
    3. Click "Helpset File."
    Then run the indexer. For doc:
    1. Go to http://otn.oracle.com/ohguide/help/.
    2. Click "Authoring Oracle Help Systems."
    3. Click "Using the Full-text Search Indexer."
    On the development side, the APIs are different, but they are also very
    simple. You create a Help object, add HelpSets, and associate topic-ids
    with java UI components using the CSHManager as described in the
    Oracle Help Guide:
    1. Go to http://otn.oracle.com/ohguide/help/.
    2. Click "Oracle Help for Java Developer's Guide."

  • Questions on Stream Closed

    Hi,
    I was just testing on this sequence of reopening the input stream. Im having an error when trying to read again to the System.in after I've closed in another function. Please advise what could be the cause of it. Here's the code and output. Thanks.
    import java.io.InputStreamReader;
    import java.io.IOException;
    public class Streams{
        public static void main(String[] args){
            Streams s = new Streams();
            s.closeOne();
            s.closeTwo();
        public void closeOne(){
            InputStreamReader ir = new InputStreamReader(System.in);
            try{
                ir.read();
                ir.close();
            }catch(IOException io){}
        public void closeTwo(){
            InputStreamReader ir = new InputStreamReader(System.in);
            try{
                ir.read();
                ir.close();
            }catch(IOException ioe){ ioe.printStackTrace(); }
    java Streams
    3
    java.io.IOException: Stream closed
            at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120)
            at java.io.BufferedInputStream.read(BufferedInputStream.java:270)
            at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
            at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
            at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:131)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:117)
            at java.io.InputStreamReader.read(InputStreamReader.java:151)
            at Streams.closeTwo(Streams.java:21)
            at Streams.main(Streams.java:7)Regards,
    Rhani

    java.io.IOException: Stream closed
    Oh come on. How mch more clearer can the error
    message be? Can you walk through a door after ithas
    been closed?May I interest you in some Midol?Bite me!I'm not big on seafood.
    I just don't think it's that bad a question.

  • XI Mail Adapter: sending emails with attachment with help of java mapping

    Hi ,
    On trying out the scenerio mentioned in the blog, using the java mapping provided
    "XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    The scenerio works just fine.
    But the payload as the content of the attachment is not getting generated in proper XML format.
    I suppose it's because of the replace special characters code part..
    Can anyone help me state the modification required in the code.
    Thanks!
    Regards,
    Faria Mithani

    It might be a codepage issue. Is your original payload UTF-8?

  • Custom thread pool for Java 8 parallel stream

    It seems that it is not possible to specify thread pool for Java 8 parallel stream. If that's so, the whole functionality is useless in most of the situations. The only situation I can safely use it is a small single threaded application written by one person.
    In all other cases, if I can not specify the thread pool, I have to share the default pool with other parts of the application. If someone submits a task that takes a lot of time, my tasks will get stuck. Is that correct or am I overlooking something?
    Imagine that someone submits slow networking operation to the fork-join pool. It's not a good idea, but it's so tempting that it will be happening. In such case, all CPU intensive tasks executed on parallel streams will wait for the networking task to finish. There is nothing you can do to defend your part of the application against such situations. Is that so?

    You are absolutely correct. That isn't the only problem with using the F/J framework as the parallel engine for bulk operations. Have a look http://coopsoft.com/ar/Calamity2Article.html

  • Call Oracle Help for Java in Oracle forms running in the web

    Hi, everyone,
    We are developing a web-enabled Oracle database application
    system. Oracle suggested us to use Oracle Help for Java(OHJ) to
    create an online help system for the web environment. We
    successfully created a OHJ program which can be independently.
    But we still have no idea how to call this OHJ program from the
    forms running in the web environment.
    Could anyone help us out?
    Thanks.
    null

    I would like to know if anyone has been able to do this too. Could someone respond if they have successfully gotten this to work?
    Thanks!!

Maybe you are looking for

  • Audio tracks don't show up properly on sequence when enlarging timeline

    On the timeline, audio tracks don't show up properly, by either appearing out of sync or by repeating itself when I enlarge it to work on it. Other sequences in the project work fine, and I've tried coping a pasting this sequence or parts of it to a

  • I need to reactivate every time I start an app

    It's getting a bit annoying by now, I've been doing reactivations since two weeks now and it started after activating my second month of creative cloud usage. Is there a way to reset this entirely?

  • Deleted itunes - please help!

    My daughter accidently deleted all her songs from the library, they ended up in the comp recycle bin. We restored them from the recycle bin but they have dissapeared completely. How can we get them back into her library? Please please help.

  • How to export BIAR from reports?

    Hello,everyone! I want to migrate the reports form my local BO server to another BO server,My ideas are: First,I export my local BO reports to BIAR file format. Second,use import wizard import the BIAR file into another BO server. But,I can't know ho

  • Desktop & Screensaver won't store my changes

    My Desktop & Screensaver preference pane (Lion 10.7.4) is not storing changes to the "Folders" section.  Does anyone know how I can fix this problem? I added folders under "Folders" and later deleted the folders from my hard drive.  The Desktop & Scr