Definition of BufferedReader and bufferedwriter

Can anyone give me better/more detail explanation or definition of bufferedreader and bufferedwriter?
what is the difference of static and non-static variables?
Thanks,
heJuKp

Ok, I didn't ask for a link in my message. I have already looked for what I want to know in the java.sun.com and other a few webpages already. I have been to the page that u provided in your message too. I have been through those tutorials many times. Those definitions are not very helpful to me. Reader reads, and writer writes. Of coz I know that. I know how to use those BufferedWriter and BufferedReader as much as I should. But I just want to know the better summerized definitions of them.
For example - after reading all the notes from webpages, I have a summerized definition of "constructors"... Constructors have the same name with the class name. Constructor is a special method which is called when an object is created but before the object is used. Not having the return type, not even "void", is the major difference between constructors and othedr methods. Constructor is used for initializing the objects or instance variables. Constructors are invoked using the keyword "new". When the constructor is executed, all the variables and the objects are in fully useable state.
I am asking for something like that for BufferedWriter and BufferedReader. Not a link. Just tell me what you know if you know.
Thank you.
Differences like that do not concern BufferedReader or
BufferedWriter only. You're talking about Java
language issues here.
It's a good idea to plough your way through the Java
Tutorials
(http://java.sun.com/docs/books/tutorial/index.html)
or get a good book on Java.
To answer your question as well: static variables are
class variables, while non-static variables belong to
instances.

Similar Messages

  • Can't a BufferedReader and a BufferedWriter be open at the same time?

    To the experienced:
    I am writing a class to selectively extract data from an Excel file, and write out to a plain text file. I am using JDeveloper 11.1.1.3.
    It works fine and writes out the output file as expected when reading data from the spreadsheet and directly writing to the output file.
    However, I need to convert the data in one of the columns based on a conversion table. The conversion table is a plain text file that has two columns separated by a space. I read in the conversion table using a BufferedReader and put it in a HashMap for use. However, once the Buffered Reader and the HashMap are introduced, the BufferedWriter does not work any more.
    The way the class works is that, the main() method (not shown here) reads data from the Excel sheet into a List, and then calls the method showExcelData() (as shown below) to write out data from the List to a plain text file.
    When the green color code was not added, the output file was written to the disk fine. A sample line from the output file is:
    JOHN:DOE:11223344:12345:20110824By adding the green code, I expect it to output the line as:
    JOHN:DOE:11223344:STUDENT:20110824The problem is, after the green code is added, the output file the program writes to the disk is zero size.
    I added the System.out.println() lines for troubleshooting. These lines show that the BufferedWriter <b>out</b> is not null, and the conversion is actually taking place. But <b>out.write()</b> simply does not work. Commenting out the green code, the program is working again - of course, without date conversion for that column.
    There must be something wrong but I can not see where it is wrong.
    Your help is very much appreciated!
    Newman
    <pre>
    private static void showExcelData(List sheetData, String outputFilename) throws IOException {
    BufferedWriter out = new BufferedWriter(new FileWriter(outputFilename));
    System.out.println("Is out null? " + (out == null));
    BufferedReader in = null;
    for (int i = 3; i < sheetData.size(); i++) {
    List list = (List)sheetData.get(i);
    for (int j = 0; j < list.size(); j++) {
    HSSFCell cell = (HSSFCell)list.get(j);
    if (j == 5 || j == 6 || j == 7 || j == 11) {
    <font color="green"><b>
    // The column with index 11 is the column of data that needs conversion:
    if (j == 11) {
    String convertionFilename = "ConversionTable.txt";
    Map<String, String> liveMap =
    new HashMap<String, String>();
    try {
    in = new BufferedReader(new FileReader(convertionFilename));
    String line = null;
    while ((line = in.readLine()) != null) {
    String[] keyValue = line.split(" ");
    liveMap.put(keyValue[0], keyValue[1]);
    } catch (IOException e) {
    String message = e.getMessage();
    String titleCode =
    cell.getRichStringCellValue().toString();
    String role = liveMap.get(titleCode).toUpperCase();
    out.write(role);
    System.out.println(titleCode + " " + role);
    } else {</b></font>
    out.write(cell.getRichStringCellValue().toString().toUpperCase());
    System.out.println(cell.getRichStringCellValue().toString().toUpperCase());<font color="green"><b>
    }</b></font>
    if (j < list.size() - 1 && j != 11) {
    out.write(":");
    } else if (j == 26) {
    if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {
    if (DateUtil.isCellDateFormatted(cell)) {
    Calendar cellDate = Calendar.getInstance();
    cellDate.setTimeInMillis(cell.getDateCellValue().getTime());
    String year = "" + cellDate.get(Calendar.YEAR);
    String month =
    padding(cellDate.get(Calendar.MONTH) + 1);
    String day =
    padding(cellDate.get(Calendar.DAY_OF_MONTH));
    String expDate = year + month + day;
    out.write(":" + expDate);
    out.write(System.getProperty("line.separator"));
    if (in != null) in.close();
    if (out != null) out.close();
    </pre>

    Hi, All,
    This posting is at the bottom of the stack. Quite a few more postings were added on top of this and solved, and now I reach back to this one.
    The main problems are:
    1. Close the I/O buffer after finishing using it. Otherwise the data in the buffer do not get flushed to the file on the disk. I think that is the cause of the problem of getting zero sized output file.
    2. Do not count on Excel to stop at a blank cell by using Ctrl-down / Ctrl-up. The file I am processing is produced by some reporting program which, I think, instead of skipping the cell, puts a zero-sized string in it. Obviously, Excel does not stop at such cells. I had checked the columns using the Ctrl-down/Ctrl-up key and through that column did not have blank cells. Sharp-eyed gimbal2 spotted the problem, and led me to re-inspect the column by using up/down arrow keys instead, and found the blank cells. Such empty strings are used in my code as key in searching the map (String role = liveMap.get(titleCode).toUpperCase();) and caused the problem.
    And the lesson is, when doing some quick and dirty tests, do not get too quick and too dirty, which can end up slower rather than faster.
    Many thank to all of you for giving me the helping hand!
    Newman

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • Definitions of record and table type

    I’m confused with the definition of record and table type. Below is my understanding, Please correct me if anything wrong. Thanks in advance!
    Record type can only hold one record with multiple fields.
    Table type is an array (multiple records) with only one field
    Table type defined with %rowtype (table of records) is an array of multiple records with multiple fields.

    I am not sure that I understand what you are asking. I have not heard the term table type before.
    However, I think a record type is more closely aligned to the %rowtype declaration. Maybe a collection is what you are looking for with the term table type.
    From the Oracle 10g documentation:
    %ROWTYPE
    In PL/SQL, records are used to group data. A record consists of a number of related fields in which data values can be stored. The %ROWTYPE attribute provides a record type that represents a row in a table. The record can store an entire row of data selected from the table or fetched from a cursor or cursor variable.
    Columns in a row and corresponding fields in a record have the same names and datatypes. In the example below, you declare a record named dept_rec. Its fields have the same names and datatypes as the columns in the dept table.
    DECLARE
    dept_rec dept%ROWTYPE; -- declare record variable

  • Basic Java Help (BufferedReader and PrintWriter)

    I am studying Java for part of my degree and have become quite stuck on a question. I have set up a seperate client class and that appears to work just fine, yet when i come to set up the server class i encounter no end of problems.
    Firstly i have to set up a Server class which handles the communication to the client ;
    import java.net.*;
    import java.io.*;
    public class Server
    private ServerSocket ss;
    private Socket socket;
    //Streams for connections
    private InputStream is;
    private OutputStream os;
    //Writer and reader for communication
    private PrintWriter toClient;
    private BufferedReader fromClient;
    private GameSession game;
    //use a high numbered non-dedicated port
    static final int PORT_NUMBER = 3000;
    //set up socket communication
    public Server() throws IOException
    ss = new ServerSocket(PORT_NUMBER);
    //accept a player connection
    public void acceptPlayer()
    System.out.println("Waiting for player");
    //wait for and accept a player
    try
    while(true)
    //Loop endlessly waiting for client connections
    // Wait for a connection request
    socket = ss.accept();
    openStreams();
    //Client has connected
    game.run(); <-- this i presume runs the method run() from the GameSession Class?
    closeStreams();
    socket.close();
    catch(Exception e)
    System.out.println("Trouble with a connection "+ e);
    private void openStreams() throws IOException
    final boolean AUTO_FLUSH = true;
    is = socket.getInputStream();
    fromClient = new BufferedReader(new InputStreamReader(is));
    os = socket.getOutputStream();
    toClient = new PrintWriter(os, AUTO_FLUSH);
    System.out.println ("...Streams set up");
    private void closeStreams() throws IOException
    toClient.close();
    os.close();
    fromClient.close();
    is.close();
    System.out.println("...Streams closed down");
    // This is the top-level method to handle one game
    public void run() throws IOException
    game = new GameSession(socket);
    acceptPlayer();
    System.out.println("Server closing down");
    } // end class
    which also seems to be about what the question asks, yet i have to link this to the GameSession class sending it a reference of the socket. Which i think i have with the inclusion of the new GameSession(socket).
    When i come to write the GameSession class i realise i have to use the BufferedReader and PrintWriter when i try and do this i get a bindException as obviously the port is up and running from the Server class.
    I have tried incorporating the openStreams() in the GameSession after rermoving them from the Server class but get more Exceptions! What am i doing wron and where would i find more information on this?
    Thanks for any help you may give.

    You must redesign your Server and GameSession class.
    Study this code:
    /* save and compile as GameServer.java */
    import java.net.*;
    import java.io.*;
    public class GameServer{
      static final int PORT_NUMBER = 3000;
      private ServerSocket ss;
      GameSession game;
      public GameServer() throws IOException{
        ss = new ServerSocket(PORT_NUMBER);
        game = new GameSession();
      public void acceptPlayer(){
        System.out.println("Waiting for player");
        try{
          while(true){
            Socket s = ss.accept();
            new Thread(new ClientHandler(s)).start();
        catch(Exception e){
          System.out.println("Trouble with a connection "+ e);
      public static void main(String[] args){
        try{
          GameServer gs = new GameServer();
          gs.acceptPlayer();
        catch (Exception e){
          e.printStackTrace();
      class ClientHandler implements Runnable{
        private Socket socket;
        private PrintWriter toClient;
        private BufferedReader fromClient;
        public ClientHandler(Socket sc){
          socket = sc;
          try{
            fromClient
              = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            toClient = new PrintWriter(socket.getOutputStream(), true);
          catch (Exception e){
            e.printStackTrace();
        public void run() throws IOException{
          game.addNewClient(socket, fromClient, toClient);
    }

  • I installed a rcomended update of idt high definition audio codec and now my audio is dead

    i installed a rcomended update of idt high definition audio codec and now my audio is dead

    Hi,
    Can you post back with the following.
    1.  The full Model No. and Product No. of the notebook - see Here for a guide on locating this information.
    2.  The full version of the operating system you are using ( ie Windows 7 64bit ).
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • What is the definition of "plays" and/or "skips" in iTunes (version 10.5.3)?

    Hi all,
    I'm trying to "clean out" my iTunes library by deleting songs I never listen to, and maybe organizing playlists of songs I listen to more often than others.  I don't know the technical/offical terms, but there is the "toolbar" that shows artist/track/album/length etc., with options to add or remove categories such as plays/skips/genre and so on... My QUESTION is:  What is the definition of a "play" or a "skip?"  That is, are they tallied according to how many seconds a track is played before skipping (or continuing)?  If anyone can answer this, that would be awesome!
    PS.  Secondary question:  if the plays/skips are determined by a specific time limit, is there a way to change that time?  For example, if a skip is defined by clicking "next" before the track has reached 0:05 seconds, can I change that number to 0:03 or 0:10?
    Thanks so much!
    --Bobby

    I agree Luciu, I want to see the official docs for this too anyone know where they are?
    My understanding is that anytime you press skip *on your ipod* (not in iTunes while playing). This would appear to disadvantage songs with very long slow outros - as you might want to skip these to get to the next song. This would mean songs with long slow or hidden track outros would accrue additional skip counts.
    Perhaps Apple could ignore skips that are within 20 or 30 seconds of the ending to avoid that but yeah some docs would be nice to see.
    I use smart playlists to create playlists that do not contain any songs that have been skipped in the past 12 months. That suggests a timestamp is logged with each skip also.

  • NoClassDefFoundError: javax/wsdl/Definition in WLS_Spaces and WLS_Portlet.

    Hi,
    The software's I used are:
    1. Oracle Database (Oracle Database 11g Release 2 (11.2.0.1.0))
    2. Repository Creation Utility (ofm_rcu_win32_11.1.1.2.1_disk1_1of1)
    3. WebLogic (wls1033_oepe111150_win32)
    4. WebCenter (ofm_wc_generic_11.1.1.2.0_disk1_1of1)
    5. Content Management (ofm_ucm_generic_10.1.3.5.1_disk1_1of1)
    When I try to run the Administration Server and the three Managed Servers (WLS_Portlet, WLS_Services and WLS_Spaces in Weblogic Server), it is throwing exception in WLS_Spaces and WLS_Portlet servers and completing to Running Mode.
    Attaching the Log Details below for one of the server.
    C:\Oracle\Middleware\user_projects\domains\base_domain\bin>startManagedWebLogic
    .cmd WLS_Portlet http://dpdb:7001
    JAVA Memory arguments: -Xms512m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSiz
    e=128m -XX:MaxPermSize=256m
    WLS Start Mode=Development
    CLASSPATH=C:\Oracle\MIDDLE~1\patch_wls1033\profiles\default\sys_manifest_classp
    ath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_oepe1033\profiles\default\sys_m
    anifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\patch_ocp353\profiles\d
    efault\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\MIDDLE~1\JDK160~1\li
    b\tools.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\
    MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\Oracle\MIDDLE~1\modules\features
    \weblogic.server.modules_10.3.3.0.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\
    webservices.jar;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\Oracle
    \MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\Oracle\MIDDLE~1\ORACLE~1\
    soa\modules\commons-cli-1.1.jar;C:\Oracle\MIDDLE~1\ORACLE~1\soa\modules\oracle.
    soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\Middleware\Oracle_WC1\webcenter\mo
    dules\oracle.portlet.server_11.1.1\oracle-portlet-api.jar;C:\Oracle\MIDDLE~1\OR
    ACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\common\d
    erby\lib\derbyclient.jar;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
    PATH=C:\Oracle\MIDDLE~1\patch_wls1033\profiles\default\native;C:\Oracle\MIDDLE~
    1\patch_oepe1033\profiles\default\native;C:\Oracle\MIDDLE~1\patch_ocp353\profil
    es\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;C:\Oracle\
    MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\Ora
    cle\MIDDLE~1\JDK160~1\jre\bin;C:\Oracle\MIDDLE~1\JDK160~1\bin;C:\app\Administra
    tor\product\11.2.0\dbhome_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syste
    m32\Wbem;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_18"
    Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
    Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\JDK160~1\bin\java -client -Xms512m -Xmx1024m -XX:CompileTh
    reshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=WLS_Portle
    t -Djava.security.policy=C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.poli
    cy -Dweblogic.security.SSL.trustedCAKeyStore="C:\Oracle\Middleware\wlserver_10.
    3\server\lib\cacerts" -Xverify:none -da -Dplatform.home=C:\Oracle\MIDDLE~1\WL
    SERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Ora
    cle\MIDDLE~1\WLSERV~1.3\server -Ddomain.home=C:\Oracle\MIDDLE~1\USER_P~1\domai
    ns\BASE_D~1 -Dcommon.components.home=C:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=
    11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Lo
    gger -Djrockit.optfile=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jr
    ocket_optfile.txt -Doracle.domain.config.dir=C:\Oracle\MIDDLE~1\USER_P~1\domain
    s\BASE_D~1\config\FMWCON~1 -Doracle.server.config.dir=C:\Oracle\MIDDLE~1\USER_P
    ~1\domains\BASE_D~1\config\FMWCON~1\servers\WLS_Portlet -Doracle.security.jps.c
    onfig=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~1\config\fmwconfig\jps-config.
    xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.car
    mlloc=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~1\config\FMWCON~1\carml -Digf
    .arisidstack.home=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~1\config\FMWCON~1\
    arisidprovider -Dweblogic.alternateTypesDirectory=\modules\oracle.ossoiap_11.1.
    1,\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dtan
    gosol.coherence.log=jdk -DjiveHome=C:\Oracle\MIDDLE~1\USER_P~1\domains\BASE_D~1
    \config\fmwconfig\servers\WLS_Portlet\owc_discussions_11.1.1.2.0 -Doracle.wc.op
    enusage.clustername=localhost -Doracle.wc.openusage.collectorport=31314 -Doracl
    e.wc.openusage.timeout=30 -Doracle.wc.openusage.unicast=true -Doracle.wc.openus
    age.enabled=false -Doracle.core.ojdl.logging.usercontextprovider=oracle.core.oj
    dl.logging.impl.UserContextImpl -DUSE_JAAS=false -Djps.policystore.hybrid.mode=
    false -Djps.combiner.optimize.lazyeval=true -Djps.combiner.optimize=true -Djps.
    auth=ACC -Doracle.core.ojdl.logging.usercontextprovider=oracle.core.ojdl.loggin
    g.impl.UserContextImpl -Doracle.wc.openusage.clustername=localhost -Doracle.wc.
    openusage.collectorport=31314 -Doracle.wc.openusage.timeout=30 -Doracle.wc.open
    usage.unicast=true -Doracle.wc.openusage.enabled=false -Doracle.webcenter.taggi
    ng.scopeTags=false -Doracle.mds.bypassCustRestrict=true -Djava.awt.headless=tru
    e -Doracle.webcenter.tagging.scopeTags=false -XX:+UseParallelGC -XX:+DisableExp
    licitGC -Dwc.oracle.home=C:\Oracle\Middleware\Oracle_WC1 -Dem.oracle.home=C:\
    Oracle\Middleware\oracle_common -Djava.awt.headless=true -Dweblogic.management.
    discover=false -Dweblogic.management.server=http://dpdb:7001 -Dwlw.iterativeDe
    v=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.d
    irs=C:\Oracle\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath
    ;C:\Oracle\MIDDLE~1\patch_oepe1033\profiles\default\sysext_manifest_classpath;C
    :\Oracle\MIDDLE~1\patch_ocp353\profiles\default\sysext_manifest_classpath webl
    ogic.Server
    <Jul 16, 2010 11:01:55 AM IST> <Notice> <WebLogicServer> <BEA-000395> <Followin
    g extensions directory contents added to the end of the classpath:
    C:\Oracle\Middleware\user_projects\domains\base_domain\lib\mbeantypes\csp-id-as
    serter.jar>
    <Jul 16, 2010 11:01:55 AM IST> <Info> <WebLogicServer> <BEA-000377> <Starting W
    ebLogic Server with Java HotSpot(TM) Client VM Version 16.0-b13 from Sun Micros
    ystems Inc.>
    <Jul 16, 2010 11:01:57 AM IST> <Info> <Security> <BEA-090065> <Getting boot ide
    ntity from user.>
    Enter username to boot WebLogic server:weblogic
    Enter password to boot WebLogic server:
    <Jul 16, 2010 11:02:12 AM IST> <Info> <Management> <BEA-141107> <Version: WebLo
    gic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 >
    <Jul 16, 2010 11:02:14 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to STARTING>
    <Jul 16, 2010 11:02:14 AM IST> <Info> <WorkManager> <BEA-002900> <Initializing
    self-tuning thread pool>
    <Jul 16, 2010 11:02:14 AM IST> <Notice> <LoggingService> <BEA-320400> <The log
    file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\WLS_Portlet
    \logs\WLS_Portlet.log will be rotated. Reopen the log file if tailing has stopp
    ed. This can happen on some platforms like Windows.>
    <Jul 16, 2010 11:02:14 AM IST> <Notice> <LoggingService> <BEA-320401> <The log
    file has been rotated to C:\Oracle\Middleware\user_projects\domains\base_domain
    \servers\WLS_Portlet\logs\WLS_Portlet.log00001. Log messages will continue to b
    e logged in C:\Oracle\Middleware\user_projects\domains\base_domain\servers\WLS_
    Portlet\logs\WLS_Portlet.log.>
    <Jul 16, 2010 11:02:14 AM IST> <Notice> <Log Management> <BEA-170019> <The serv
    er log file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\WLS_
    Portlet\logs\WLS_Portlet.log is opened. All server side log events will be writ
    ten to this file.>
    <Jul 16, 2010 11:02:19 AM IST> <Notice> <Security> <BEA-090082> <Security initi
    alizing using security realm myrealm.>
    <Jul 16, 2010 11:02:20 AM IST> <Notice> <LoggingService> <BEA-320400> <The log
    file C:\Oracle\Middleware\user_projects\domains\base_domain\servers\WLS_Portlet
    \logs\access.log will be rotated. Reopen the log file if tailing has stopped. T
    his can happen on some platforms like Windows.>
    <Jul 16, 2010 11:02:20 AM IST> <Notice> <LoggingService> <BEA-320401> <The log
    file has been rotated to C:\Oracle\Middleware\user_projects\domains\base_domain
    \servers\WLS_Portlet\logs\access.log00001. Log messages will continue to be log
    ged in C:\Oracle\Middleware\user_projects\domains\base_domain\servers\WLS_Portl
    et\logs\access.log.>
    <Jul 16, 2010 11:02:24 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to STANDBY>
    <Jul 16, 2010 11:02:24 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to STARTING>
    java.lang.NoClassDefFoundError: javax/wsdl/Definition
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.privateGetPublicMethods(Class.java:2547)
    at java.lang.Class.privateGetPublicMethods(Class.java:2557)
    at java.lang.Class.getMethods(Class.java:1410)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.getImplementedI
    nterfaces(EjbAnnotationProcessor.java:1687)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processSessionA
    nnotations(EjbAnnotationProcessor.java:447)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotati
    ons(EjbAnnotationProcessor.java:310)
    at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotati
    ons(EjbAnnotationProcessor.java:180)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandar
    dAnnotations(EjbDescriptorReaderImpl.java:344)
    at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnly
    DescriptorFromJarFile(EjbDescriptorReaderImpl.java:204)
    at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJa
    rFile(EjbDescriptorFactory.java:93)
    at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModul
    e.java:1242)
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Mod
    uleListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Dep
    loymentCallbackFlow.java:507)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachine
    Driver.java:41)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(De
    ploymentCallbackFlow.java:149)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(De
    ploymentCallbackFlow.java:45)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.j
    ava:1221)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachine
    Driver.java:41)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.
    java:367)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.ja
    va:58)
    at weblogic.application.internal.DeploymentStateChecker.prepare(Deploym
    entStateChecker.java:154)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(Ap
    pContainerInvoker.java:60)
    at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeplo
    yment.java:141)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(De
    ploymentAdapter.java:39)
    at weblogic.management.deploy.internal.DeploymentAdapter.prepare(Deploy
    mentAdapter.java:191)
    at weblogic.management.deploy.internal.AppTransition$1.transitionApp(Ap
    pTransition.java:21)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transition
    Apps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(Co
    nfiguredDeployments.java:165)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(Con
    figuredDeployments.java:122)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(D
    eploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(De
    ploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassNotFoundException: javax.wsdl.Definition
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 37 more
    <Jul 16, 2010 11:02:32 AM IST> <Error> <Deployer> <BEA-149205> <Failed to initi
    alize the application 'wsm-pm' due to error weblogic.application.ModuleExceptio
    n: Exception preparing module: EJBModule(wsm-pmserver.jar)
    [EJB:011023]An error occurred while reading the deployment descriptor. The erro
    r was:
    javax/wsdl/Definition..
    weblogic.application.ModuleException: Exception preparing module: EJBModule(wsm
    -pmserver.jar)
    [EJB:011023]An error occurred while reading the deployment descriptor. The erro
    r was:
    javax/wsdl/Definition.
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Mod
    uleListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Dep
    loymentCallbackFlow.java:507)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachine
    Driver.java:41)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(De
    ploymentCallbackFlow.java:149)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: javax.wsdl.Definition
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    Truncated. see log file for complete stacktrace
    >
    <Jul 16, 2010 11:02:38 AM IST> <Error> <Deployer> <BEA-149205> <Failed to initi
    alize the application 'wsrp-tools [Version=11.1.1.2.0]' due to error java.lang.
    ClassNotFoundException: javax.wsdl.WSDLException.
    java.lang.ClassNotFoundException: javax.wsdl.WSDLException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: javax.wsdl.WSDLException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    Truncated. see log file for complete stacktrace
    >
    <Jul 16, 2010 11:02:41 AM IST> <Notice> <Log Management> <BEA-170027> <The Serv
    er has established connection with the Domain level Diagnostic Service successf
    ully.>
    <Jul 16, 2010 11:02:42 AM IST> <Error> <oracle.wsm.resources.policymanager> <WS
    M-02054> <Failure in looking up EJB component QueryService#oracle.wsm.policyman
    ager.ejb.IStringQueryServiceRemote.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to ADMIN>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to RESUMING>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090171> <Loading the id
    entity certificate and private key stored under the alias DemoIdentity from the
    jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoIdentity.jks.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090169> <Loading truste
    d certificates from the jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\
    lib\DemoTrust.jks.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090169> <Loading truste
    d certificates from the jks keystore file C:\Oracle\MIDDLE~1\JDK160~1\jre\lib\s
    ecurity\cacerts.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090898> <Ignoring the t
    rusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Cente
    r,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certif
    icate list raised a certificate parsing exception PKIX: Unsupported OID in the
    AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090898> <Ignoring the t
    rusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Cente
    r,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certif
    icate list raised a certificate parsing exception PKIX: Unsupported OID in the
    AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090898> <Ignoring the t
    rusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3".
    The loading of the trusted certificate list raised a certificate parsing except
    ion PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1
    .11.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090898> <Ignoring the t
    rusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems
    CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certifica
    te parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1
    .2.840.113549.1.1.11.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Security> <BEA-090898> <Ignoring the t
    rusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The load
    ing of the trusted certificate list raised a certificate parsing exception PKIX
    : Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Server> <BEA-002613> <Channel "Default
    " is now listening on 10.0.4.126:8889 for protocols iiop, t3, ldap, snmp, http.
    >
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <Server> <BEA-002613> <Channel "Default
    Secure" is now listening on 10.0.4.126:8789 for protocols iiops, t3s, ldaps, ht
    tps.>
    <Jul 16, 2010 11:02:42 AM IST> <Notice> <WebLogicServer> <BEA-000332> <Started
    WebLogic Managed Server "WLS_Portlet" for domain "base_domain" running in Devel
    opment Mode>
    <Jul 16, 2010 11:02:45 AM IST> <Notice> <WebLogicServer> <BEA-000365> <Server s
    tate changed to RUNNING>
    <Jul 16, 2010 11:02:45 AM IST> <Notice> <WebLogicServer> <BEA-000360> <Server s
    tarted in RUNNING mode>
    I'm stuck on this since a long and time and not able to resolve it. Please post the solution if any.
    Thanks and advance,
    Surender Reddy

    At first sight it seems your webcenter installation does not match the version of your WLS.
    Your WLS installations seems to be 10.33 and not 10.3.2
    If you are using WLS 10.3.3 you MUST also install webcenter 11.1.3
    That could be the cause of your problems.

  • Confusing definition of My and Partner Role in PartnerLinks

    Assume I create two BPEL processes: One producer and one consumer
    Each of them needs a JMS adapter as partner services.
    When I click in the producer BPEL process on the JMS adapter definition
    then I have to specify:
    Partner Link Type=Produce_Message_plt
    Partner Role=Produce_Message_role
    My role=not specified
    When I click in the consumer BPEL process on the JMS adapter definition
    then I have to specify:
    Partner Link Type=Consume_Message_plt
    Partner Role=not specified
    My role=Consume_Message_role
    The relationship between "My role" and "Partner role" is somehow asymetric and confusing.
    at a first glance I would have said before: The view is always from the BPEL process side.
    But why do I have to specify NO "My role" in the producer ?
    When I try to specify "My role" as "Produce_Message_role" and leave
    "Partner role" as not specified then I get errors.
    Can somehow explain me what the logic behind should be ?
    Peter

    You need to look at it from a message type perspective. Is the message you are calling async, or sync
    If the process is sync you need to specify both, this is calling a sync partner link.
    PartnerRole=Invoke
    MyRole=Receive
    Async can be tricky. When you call a async Partner Link, e.g. JMS Adpater you typically only one operation exists.
    PartnerRole=Invoke
    You are telling the partner to use the Invoke operation.
    Async can be fire and forget or you may want to wait for a response so you have to implement a Receive activity. In this case you are the consumer and there is no Partner Role operation
    MyRole=Receive
    So to keep it simple
    Sync Invoke activity = Both
    Async Invoke activity = PartnerRole
    Async Receive activity = MyRole
    cheers
    James

  • BufferedReader and new line character

    Hi,
    Java doc of BufferedReaders' readLine method says
    Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
    And the returned string does not contain \r or \n characters. Is it possible to get the the character encountered by BufferedReader which caused the the line to end. (Wether it is \r , \n or \r\n). Or is possible to stop buffered reader from looking out for all \r, \n and \r\n and make it look only for \n.
    Best regards,
    Chamal.

    Hi,
    I want add the line seperator character back to the returned string.
    For example if there was \r then I want to add a \r back to the returned string by readLine method.
    Chamal.

  • Table Definitions for Safari and Firefox

    All of the sudden my method to make a table 100% of the
    vertical height of a browser window in Safari and Firefox for the
    Mac has ceased to work. It works fine on PCs. I used both
    Dreamweaver and GoLive in my efforts. Anythougts on how to more
    appropriately or alternatively set this definition correctly?

    Here's the deal.
    A doctype on an HTML page tells the browser how to render the
    page. If
    there is no doctype, or if there is an invalid one, the page
    is rendered in
    quirks mode. If there is a valid doctype, the page is
    rendered in standards
    mode.
    DMX inserted a broken doctype on the page (i.e., functionally
    equivalent to
    no doctype). Earlier versions inserted NO doctype. Hence, all
    these pages
    are rendered in quirks mode.
    In quirks mode, the browser makes an attempt to render
    invalid HTML. Not
    all browsers attempt the same rendering - so you will see a
    variety of
    differences, comparing one browser to the next on the same
    page.
    In standards mode, the browsers all render the same (so they
    say - but in
    practice, while not true, it's much more uniform).
    Table height is invalid HTML. It always has been - it was
    never a part of
    HTML's specs.
    Browsers in quirks mode will try to render table heights.
    Browsers in
    standards mode willl not.
    Geddit?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Poinkster" <[email protected]> wrote in
    message
    news:ehm0jh$80t$[email protected]..
    > All of the sudden my method to make a table 100% of the
    vertical height of
    > a
    > browser window in Safari and Firefox for the Mac has
    ceased to work. It
    > works
    > fine on PCs. I used both Dreamweaver and GoLive in my
    efforts. Anythougts
    > on
    > how to more appropriately or alternatively set this
    definition correctly?
    >
    >
    >

  • Conflict with FileWriter and bufferedWriter

    Hello all, i'm having problems with this code. The compiler says: The method put(String, BufferedWriter) in type Map<String, BufferedWriter> is not applicable for the arguments(String, FileWriter).
    Also there is another error that says: Cannot Cast From BufferedWriter to FileWriter.
    i understand that to use a BufferedWriter, you need a FileWriter, i'm not used to deal with maps and bufferedWriters together :/
    Thanks in advance!
    package pkg.mig;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    public class Uf_file {
         static Map<String, BufferedWriter> filemap;
         static Map<String, Long> filelenghmap;
         static Map<String, Integer> filesecuence;
         static FileWriter out;
            static BufferedWriter bw;
         public static void writeUF(String ufName, String sys, String uf_row) {
              if (filemap == null) {
                   filemap = new HashMap<String, BufferedWriter>();
                   if (filelenghmap == null) {
                        filelenghmap = new HashMap<String, Long>();
                        filesecuence = new HashMap<String, Integer>();
              if (filelenghmap.get(ufName) == null) {
                   filelenghmap.put(ufName, new Long(0));
                   filesecuence.put(ufName, new Integer(0));
              if (filemap.get(ufName) == null) {
                   try {
                        filemap.put(ufName, new FileWriter(getFileName(ufName, sys), true));
                        Utils.logger.info("Creando nuevo archivo: " + ufName +"-"+filesecuence.get(ufName));
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        Utils.logger.severe(e.toString());
                        Utils.close_app(1);
              out = (FileWriter) filemap.get(ufName);
              try {
                   bw.write(uf_row);
                   filelenghmap.put(ufName, filelenghmap.get(ufName) + uf_row.length());
                   if (filelenghmap.get(ufName) > Long.parseLong(Utils.app_properties.getProperty("UF_Size"))) {
                        closeUF(ufName);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         static String getFileName(String ufName, String sys) {
              filesecuence.put(ufName, filesecuence.get(ufName) + 1);
              return sys + "." + ufName + "." + Utils.getDateSystem()+"EXT-"+Utils.app_properties.getProperty("EXT") +"-"+
              Utils.fNumber(Integer.toString(filesecuence.get(ufName)),3) + ".inp";
         static void closeUF(String ufName) {
              bw = (BufferedWriter) filemap.get(ufName);
              try {
                   out.close();
                   filemap.remove(ufName);
                   filelenghmap.put(ufName, (long) 0);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }

    It has nothing to do with the map, you cannot cast from a file writer to a buffered writer, so here when you do this...
    static void closeUF(String ufName) {
              //bw = (BufferedWriter) filemap.get(ufName); // no
                                    bw = new BufferedWriter(filemap.get(ufName)); // yes
              try {
                   out.close();
                   filemap.remove(ufName);
                   filelenghmap.put(ufName, (long) 0);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         }Hope that helps!

  • Definitely removing TimeMachine and Download folder from Dock?

    Is it possible to definitely remove the app Time Machine and the default folders like Download from the dock?
    Each time I restart OSX10.5.4, they keep reappearing....

    Same thing happened when I first used Leopard. The Documents stack would not go away, even though I poofed it repeatedly. Eventually, it went away & never came back. I was never able to explain this, and nobody answered my post on the subject.
    http://discussions.apple.com/thread.jspa?threadID=1502799&tstart=0
    Keep trying.

  • URL BufferedReader and Speed

    Hello :)
    This is my first post on the java forums :P and I wanna say hello to everyone here ^^
    So here it goes ^^
    I'm using BufferedReader with a StreamReader and a URL, the prolem is that when I use the java program and the program Bufferes the URL file my connection freezes or slows down for one or few secs.
    I was wondering if there is any way I could put less pressure on the internet connection, maybe by limiting the download speed for the program.
    Hope somebody can help me :P
    darksky0

    Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html
    And when you post the code, you should properly format them. See http://forum.java.sun.com/help.jspa?sec=formatting

  • Vector and bufferedWriter

    hello all
    This is my problem :
    bufferedWriter1.write(String.valueOf(year1));
    bufferedWriter1.write("/");
    bufferedWriter1.write(String.valueOf(month1+1));
    bufferedWriter1.write("/");
    bufferedWriter1.write(String.valueOf(day1)+"  ");     
    bufferedWriter1.write(String.valueOf(hours));
    bufferedWriter1.write(":");
    bufferedWriter1.write(String.valueOf(minutes));
    bufferedWriter1.write(":");
    bufferedWriter1.write(String.valueOf(seconds));
    bufferedWriter1.newLine();
    bufferedWriter1.flush();
    client1.addElement(bufferedWriter1);
    clients=client1.toString();
    bufferedWriter2.write(clients);
    bufferedWriter2.newLine();
    bufferedWriter2.flush();after that the file that is handled by bufferedWriter2 should be the same with the one handled by bufferedWriter1... though the file of bufferedWriter2 is blank while has normal input... any ideas? i tried .elementAt(0) or (1) to get the value but no luck
    Thnx

    Enialis wrote:
    bufferedWriter1 comes from this :
    try{
    fileWriter1 = new FileWriter(prefs()+"time.txt");
    bufferedWriter1 = new BufferedWriter(fileWriter1);
    fileWriter2 = new FileWriter(prefs()+"clients.txt");
    bufferedWriter2 = new BufferedWriter(fileWriter2);
    }catch(IOException ioe){ioe.getMessage();}and it writes the specified string to the for example time.txt
    and i am not calling toString on it. the toString is called for the vector client1. the thing is that in the api says that toString gives the contents of the vector as a string... therefor i figured out it should be done that way... i dont thing there is any problem with me inputing the contents of bufferedWriter1 to the vector as its a general vector and with the toString it will come out as a string sequence.
    the problem is that i have no input for the bufferedWriter2 who writes the clients.txt
    hope that makes sense :)There are lots of problems with the code. You are calling toString on the vector, and the BufferedWriter is in the vector, so the vector calls toString on it. Calling toString on a buffered writer does not give anything that you want.
    What is it that you really want to do, and why?
    Kaj

Maybe you are looking for