I want to Read a file throw any where..

I want to read a file like www.yahoo.com how ?

http://developer.java.sun.com/developer/onlineTraining/

Similar Messages

  • I want to read a file which is in a zip and this zip file is at ftp site

    i am facing this problem and try to find the solution from last month please help me
    i want to read a file which in ziped and this zip file is at ftp site. and i want to read this file without downloading this zip file to local machine. i have to read it from ftp location only

    You can open an URLConnection to a file on an FTP server (search this forum to find out how). You can get the InputStream from the URLConnection and feed it to ZipInputStream. That should do the job.

  • I want to read a file on the client side

    Hi all,
    I want to read a file on the client side, then the server show the contents of that file.

    Signed applet sounds cool - I guess Microsoft's ActiveX technology would be the mirror of this.
    Write you file access code as you normally would and then just drop it in a applet and JAR it up.
    Use keytool to sign it - users will be requested to accept/review your certificate in order to grant file-access permissions.
    Warm regards.

  • My file has insert command and i want to read that file line by line in sql

    myfile.txt
    insert into emp values(100,200,"sumedh",11);
    insert into emp values(101,200,"amit",11);
    insert into emp values(102,200,"sam",11);
    insert into emp values(103,200,"ram",11);
    insert into emp values(104,200,"stev",11);
    I want to read this file line by line and enter this value in emp table.

    Why did you begin this thread in security.
    just like
    sqlplus <schema_owner>/<password>@<your_sid> @<path_to/myfile.txt>

  • My Ipad 1 doesn't want to read my Sim-card (any of them) What can I do?

    My Ipad doesn't want to read my sim-card (any of them) What can I do?

    I'm having the same problem.. Ipad 2. What should I do ????

  • I want to read tif file and encrypt it by aes. who can help me?

    I have several questions:
    1. Is there a java api to read and write tif files. this api can read the header of tif(IFH) and add something into the header.
    2. Is there a java api to encypt the stream of tif file by AES?
    Thanks a lot!!! every superman comes here and helps me.
    Thank u

    1. Is there a java api to read and write tif files. this api can read the header of tif(IFH) and add something into the header.javax.imageio.ImageIO
    2. Is there a java api to encypt the stream of tif file by AES?javax.crypto.CipherOutputStream

  • Want to read a file (I/O )f rom a EJB, How ?

    I 'm implementing drools in a J2EE project to implement business logic at Session Bean level. The normal way of reading the rule file(.drl) is as follows.
    final Reader source = new InputStreamReader(BaseRuleImpl.class.getResourceAsStream(rulefile.drl));
    but this gives a Server Error because of this IO operation.
    Can anyone kindly give me a solution to this ?
    Thank You.

    Could you post the exception stacktrace?

  • Why I can not find the 'dbca' file in any where (linux)

    Under $ORACLE_HOME/bin ,I cannot find the 'dbca 'file,why ?should I config any others?
    Before I install oracle on linux ,I only checked the following use the command "rpm -q gcc make binutils openmotif"
    so I only install
    'gcc-4.1.2.42.el5'
    'make-3.81-3.el5'
    'binutils-2.17.50.0.6-6.el5'
    'openmotif-2.3.0-0.5.el5'
    my oracle version is oracle -xe-univ-0.2.0.1-1.0.i386,
    linux is redhat enterprise linux 5 (64bit)
    thanks!
    Edited by: user12469990 on 2010-1-18 下午6:01

    What dbca file?
    The installation docs are at http://docs.oracle.com.
    Follow them if you wish to be successful and that means don't use unsupported versions of Linux.
    Also you can use these links for help:
    http://www.morganslibrary.org/reference/linux_oracle_inst10g.html
    http://www.morganslibrary.org/reference/linux_oracle_inst11g.html
    http://www.morganslibrary.org/reference/linux_oracle_inst11gR2.html

  • File to RFC scenario want to read file name

    Hi All,
    I am having file to RFC scenario in which i am having file name in format  text_yyyymmdd.txt.
    i want to read this file name and by separating the date in file name i have to pass this to one of the RFC date parameter.
    please help me to sort out this.
    Thanks
    Swapnil

    Hi,
    By writing simple UDF in your mapping you can Acheive this
    Try this Once
    DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String MyFileName = dynamicconfiguration.get(key);
    String str[] = MyFileName.split("_");
    return str1[1];
    Map this to the date parameter(RFC) in the mapping .
    Thank & Regards,
    Deepthi
    Edited by: Deepthi Muppasani on Sep 23, 2011 8:17 AM

  • How to read text file efficiently?

    I use CharBuffer to read text file:
    private List<String> load() throws IOException {
            final String B = "<BODY>";
            final String E = "</BODY>";
            List<String> docs = new ArrayList<String>();
            for (File file : files) {
                FileReader reader = new FileReader(file);
                CharBuffer buffer = CharBuffer.allocate(BSIZE);
                StringBuilder sb = new StringBuilder();
                while (reader.read(buffer) != -1) {
                    char[] dst = new char[buffer.length()];
                    buffer.get(dst);
                    sb.append(dst);
                    buffer.clear();
                String s = sb.toString();
                System.out.println(file + ": " + s.length());
                int start = 0;
                int i, j;
                while ((i = s.indexOf(B, start)) != -1) {
                    j = s.indexOf(E, i + B.length());
                    docs.add(s.substring(i + B.length(), j));
                    start = j + E.length();
                    //System.out.printf("%d %d %d%n", i, j, start);
            return docs;
        }The file size is 1324350, but the code say it is 772802.
    What's wrong with this code?
    I want to read text file as quickly as possible.
    Is this code the right way to read file?
    Should I use FileReader or nio Channel and ByteBuffer?
    Any suggestions are welcome!

    You are reading the file as if it were encoded in UTF-16. Each character uses two bytes so you have half the number of characters as you had bytes.
    The following code reads an entire file in one hit.
        public static String readText(File file) throws IOException {
            byte[] bytes = new byte[(int) file.length()];
            DataInputStream dis = new DataInputStream(new FileInputStream(file));
            try {
                dis.readFully(bytes);
            } finally {
                dis.close();
            return new String(bytes, "UTF-8"); // or whatever your file encoding is.
        }But you can still have less characters than bytes if there are any non ASCII-7 characters.

  • How to read a files in directory and its subdirectories

    I wants to read all files in directory, its subdirectory and further till end the files in the subdirectory of subdirectories.
    I have some idea the I can do this by using recursive function, using the functions isDirectory(), File.list() etc.
    How much you can please help me. (via code of logic)

    import java.io.*;
    import java.net.*;
    public class MyCon
    public static void main(String args[]) throws
    IOException
    File file=new File("c:/");
    openDirectory(file,"");
    System.in.read();
    static void openDirectory(File file,String indent)
    String[] string=file.list();
    String path=file.getAbsolutePath();
    for(int i=0;i<string.length;i++)
    File temp=new File(path+"/"+string);
    if(temp.isDirectory())
    openDirectory(temp,indent+" ");
    else
    System.out.println(indent+temp.getName());

  • How to modify a datafile using file read and file write

    I have a datalog file containing port and DMM setup information.  I want to read this file into an aray, update or modify it, and write it to a file.  I can read the file in, but I am at a loss on how to modify it since it is stored in an indicator.  Any suggestions?

    The simplest thing is to replace your indicator by a control, and to use a local variable to write your data into the control.
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Reading s file and saving a the dta to an array

    Hi,
    I have a txt file that is contained of text and numbersso this is the format :
    hdfsgfjsgfjsfg
    kshfkwhfl
    kshfakh
    kahflak
    Xunit , YUNIT
    1,2
    2,3
    5,4
    So I want to read this file and save the numbers to two arrays, here is my code, and it gives error on Ch[i] = result[1]; it also say array out of bound and it gives me the watrning that ReadDile.java overrides a depricated API. hELP:
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class ReadFile {
    public static void main(String[] args) throws IOException {
    /*Open the file and Read the file
         File inputFile = new File("wfmdata.txt");
         FileReader in = new FileReader(inputFile); */
         FileInputStream fis = new FileInputStream("wfmdata.txt");
    BufferedInputStream bis = new BufferedInputStream(fis);
    DataInputStream dis = new DataInputStream(bis);
         String c;
         String[] T = new String[10012];
         String[] CH = new String[10012];
    int i=0;
    for(;;)
    /*Read one line and store it in variable c */
    c = dis.readLine();
    //if a null line return
    if(c != null)
    if( (c == "XUNIT , YUNIT"))
    continue;
    String[] result = c.toString().split(",");
    T[i] = result[1];
    CH[i] = result [1];
    System.out.println( T[i] + "," + "CH" + result.length);
    i++;
         }else
    dis.close();
    how would I change the code to get rid of the errors!
    there are 10000 lines of numbers(data).
    Sanaz,

    If you are only trying to read in integers i would recommend a different approach. Try using the scanner class. It's new to 1.5 It basically splits up everything in the data source into tokens based on where there is white space. what might interest you is that it has methods to just retrieve primitive types ints, doubles etc.
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
    you might try something like this. It will ignore strings and just handle integers, based on the format you have given.
    import java.util.Scanner;
    import java.io.*;
    public class ReadFile
        public static void readFile() throws FileNotFoundException
            Scanner sc = new Scanner(new FileReader("C:\\YourFile.txt")); // set the source of the data and create a scanner object to tokenize the data
            int[] xUnit = new int[10012]; // initialise the integer arrays
            int[] yUnit = new int[10012];
            while (sc.hasNextInt() == false) // checks to see if the next "token" read by the scanner is an integer
                sc.next(); // moves onto the next token until an int is found.
            for (int count = 0; count < xUnit.length; count ++)  // goes through the array until it hits the end
                xUnit[count] = sc.nextInt(); //assigns the int to the array
                sc.next(); // skips the comma
                yUnit[count] = sc.nextInt(); //assigns the next int to the other array
            for (int count = 0; count < xUnit.length; count ++)
                System.out.println( xUnit[count] + "," + yUnit[count]); //prints out all the data read in
    }Bear in mind my java experience is fairly limited, so this may not be what you're after.

  • ODI and Essbase in different server to read the file error

    Hi,
    I have ODI and Essbase installed in different server.
    I have created an interface to execute a calc script on top of an essbase cube. I kept the Caclscript.csc file in one folder in ODI server and provide the path
    EXTRACTION_QUERY_FILE parameter is the path of the .csc file i placed in ODI server. it executed successfully to generate the extract file using the calc script in the specified path on Essbase server.
    Now i want to read that file and load it to a relational table so map the network drive from ODI server to Essbase server where the file has been generated and provided the EXTRACT_DATA_FILE_IN_CALC_SCRIPT parameter as the Network drive path but ODI is unable to read the file.
    any other option to read the file reside in essbase server and load it to relational table.
    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Error occured while reading the data file produced by calculation script.
    -KP

    I would install an ODIAgent on the Essabse server and use this agent when running this particular operation

  • DNG Converter suddenly stopped working, won't read NEF files

    Hi all, I'm new here, but am looking for some help.
    I currently am on a mac book and run photoshop CS3. I've been shooting with a nikon d700 in raw. When I upload the photos to my computer I've previously run them through the DNG converter without a problem. Now, for the past two days it has just stopped working. When I try to convert the NEF files, they are just greyed out, I can't select anything. I tried reinstalling the DNG converter, but still no luck.
    I never had any issues with it before, and now it suddenly won't read my files. Any ideas what could be wrong?
    Thank you!

    nfietz wrote:
    …When I upload the photos to my computer I've previously run them through the DNG converter without a problem…
    Had you run the DNG on a Mac before?  On the Mac, the DNG Converter works on folders only, not on individual files (unless you use the Finder to drop the icons of your raw files on the DNG Converter application icon).  From within the application, using File > Open, the icon and names of individual raw files will always appear grayed out.
    You need to target the folder that contains the files you want to convert.
    CAVEAT: all eligible files in the folder will be converted, including any and all DNG files that may already be contained in the folder.  So if you have any DNGs in that folder, they will also be converted again and the original DNGs may be overwritten.
    Wo Tai Lao Le
    我太老了
    Message was edited by: Tai Lao

Maybe you are looking for