read 3 « Operation « Java I/O Q&A





1. reading in a file thru the command line    coderanch.com

I need to input a file to be hashed, but the file to be inputted has to be chosen in the command line, not the code. It has to be in the form "java IdCheck file001.pas", where IdCheck is the name of the java file and file001 is a pascal file to be hashed. All I need to know is how ...

2. Is read a blocking call with IBM JDK??    coderanch.com

Hello All, I tried to interrupt a thread that was in a read mode on WIN NT running the SUN JDK 1.3. As expected, the thread could not be interrupted since it was in a blocked mode. However, one of our client claims that the same code interrupts the thread which is in a blocked mode with the IBM JDK 1.3 ...

3. Problems reading file    coderanch.com

i'm working in the path c:/info3/be/kahosl there i have my Test2.class with following code: package be.kahosl; ... try { FileInputStream istream = new FileInputStream("/be/kahosl/test.txt"); java.io.BufferedReader reader = new java.io.BufferedReader(istream); String line; while((line = in.readLine()) != null) { jTextArea1.setText(line); System.out.println("OK"); } } catch (FileNotFoundException e) { System.out.println("error file"); } catch (IOException e) { System.out.println("error"); } as you c i'm trying to read ...

4. reading and skipping data...confused    coderanch.com

can anyone help me with this problem? I have a file which has the following contents, _______________________________________________ shape1 300 190 280 560 455 100 shape2 120 140 120 190 360 140 670 190 shape3 : : _______________________________________________ The set of numbers are actually coordinates of the respective shapes. I want to retrieve ONLY those sets of coordinates and the number of ...

5. problem reading file    coderanch.com

Originally posted by Sophia Choi: The file reads unexpected codes and runs without stop. Well, if you expect our help, explaining what "unexpected codes" means would be a good start. If you are getting an exception, printing out the stack trace and using it to determine the offending line in your code would help. My wild guess is that ...

6. Read a file from net!    coderanch.com

I just whant to read a file from net. It should be simple but it's not working. Here is my code: try{ URL url = new URL("http://www.somePage.com\\index.html"); DataInputStream in = new DataInputStrea(url.openStream()); //reading from in..... }catch(Exception e) { System.out.println("ERROR!"); } Every time I get an exeception. It's because the string ("http://www.somePage.com\\index.html"), because servers security or the code is just wrong? If ...

7. Reading from file    coderanch.com

I've successfully read from a file; proven because I wrote to a text file by copying from a file. How do I do a System.out.println of the contents of a file? Here's my code that I used to write a file and inwhich I've also attempted to output the encoded contents of my file with println. The file I read from ...

8. reading multiple type of contents    coderanch.com

Hi , I have a situation where I am reading from a stream that contains some txt part (basically xml part) and then the later part of the stream may contain a jar file or a zip file or a binary file (.exe) or a .wav file. My method takes an InputStream as param and i am able to read the ...

9. Problem reading in P6 ppm files... Fairly Urgent    coderanch.com

Hello, I am trying to read in and process a P6 ppm file. The file looks fine in GIMP and all characters within the file (should) have values between 0 and 255. Only problem is that for some reason no matter what I do, certain characters are not being cast into that range. I've tried to use the Character.getNumericValue() method to ...





10. Reading in a file    coderanch.com

My program is suppose to read in a file and use the StringTokenizer to turn the file into tokens. However, I get a compile error when I try to read the file in. BufferedReader inputFile = new BufferedReader(new FileReader(filename)); Also, I am having trouble with my StringTokenizer. I'm not exactly sure how it's suppose to turn things into tokens. I referred ...

11. reading two files and extracting the info re from other file    coderanch.com

I have another question. I have a file whose content is like: RP00676 RP00675 RP00674 RP00671 RP00669 RP00666 RP00665 I have to read this file for each number say RP00671 and look for this ID in another file and extract some data from the other file.The other file looks like : UNIQUE-ID - RP00676 TYPES - RNA-Polymerase-Binding-Reactions ACTIVATORS - (PD00196 . ...

12. read file replace string    coderanch.com

i want to read all files in directory in file i want to search for a particular string all occurence make a new line on bases of this line and replace it with old one how this can be done for example i have .jsp file i want to replace "" with <%@ page import="com.xyz.scheme" %> "

13. Read a file to watch it    coderanch.com

I have a unique prolem where, i have to monitor a file(lets' call this file "fileabc") continuously. A lot of other processes are writing to this file. The file grows by the second. I want to read "fileabc" continuously and search for a pattern. once I reach the end of the file "fileabc" do I have to reread the file to ...

14. reading from files    coderanch.com

i have just started to prepare for scjd and as someone said started to make short programs on the diffrents java APIS. one of them was: Use an IO program to create a file with a header and data. For example:- Header: FileID, Field1Name, Field1Length, Field2Name, Field2Length etc... ie "Steven My Address 1 21" "Fred His Address 2 69" "Mary Her ...

15. Stop reading when reached the end of file    coderanch.com

I want to stop reading the file when it reaches the end of file. My code looks like this. public void fillUp() throws IOException { int c = 1; try { while (c < this.size) { next = rec.createObject(); next.readObject(dataSource); if(next != null){ heap.put(next); // put the information just read c = c + 1; }else break; } } catch (EOFException ...

16. Problem while reading Object    coderanch.com

Hi all, I have developed a client server application where the server sends an object to the client using writeObject method in the ObjectOutputStream. The client reads the object using readObject() method in the ObjectInputStream class. Every thing is working great.. But when I run my client from a place, where the internet speed (kbps) is very low, I am getting ...





17. Reading very large file    coderanch.com

18. Reading Remote File    coderanch.com

I am trying to read the contents of a file from a remote system. I was told to try to use the URL class through FTP, but I am not sure if this is the best way. import java.io.*; import java.net.*; public class RemoteFile { public static void main(String args[]) { URL url; URLConnection connection; String urlString = "ftp://username:password:21@host.domain.com/file"; String matchString ...

19. reading integer from a file    coderanch.com

Why i'm i getting this errors? Java.io.FileNotFoundException:File.dat(The system cannot find the file specified ) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at ReadInteger.(ReadInteger.java:27) at TestFile.main(TestFile.java:14) Here's my code: import java.io.*; public class ReadInteger { private File f; private FileInputStream fis; private InputStreamReader isr; private BufferedReader br; final static int maxArrayLength = 100; private int [] xIntegers; private int numOfValues; private double average; private ...

20. Reading a single value from a pipe delimited dat file    coderanch.com

I have a text file in need to get a value from in this case 0409531354|False|Residential How do I get the value I want from the file like the boolean value false I can read the file ok but what implimentation is available to scan the value I'm after FileReader in = new FileReader(inputFile); BufferedReader bwin = new BufferedReader(in); String line; ...

21. Reading *.dwg type CAD files    coderanch.com

22. reading file    coderanch.com

An applet cannot ordinarily read or write files on the host that is executing it. The JDK Applet Viewer actually permits some user-specified exceptions to this rule, but Netscape Navigator 2.0, for example, does not. Applets in any applet viewer can read files specified with full URLs, instead of by a filename. A workaround for not being to write files is ...

23. reading a file, then replacing a string...    coderanch.com

heres the package (compiles great) http://www.outrun.org/shiz/skool/Students.java package MyPack; import java.io.*; import java.util.*; public class Students { String input; String fname; String lname; int birthM; int birthD; int birthY; Calendar bday = new GregorianCalendar(); int grade = 0; String strgrade; BufferedReader console = new BufferedReader(new InputStreamReader(System.in)); public void GetName() { try { System.out.print("First name, Moron: "); fname = console.readLine(); } catch(IOException ioex) ...

24. How to read a unix compressed file?    coderanch.com

25. Reading from a file that may be in use by another program    coderanch.com

Hi! I am writing a program which will periodically read a file which another program sometimes writes to (I haven't written the other program). I don't want my program to stop the other program from being able to read at any time. How should I implement this so I can read the file without interfering with the other program and also ...

26. reading title/artist info from cd    coderanch.com

Hello, I'm writing a program for myself to keep track of the cds in my cd collection. In order to avoid the tedious task of having to type in the title/artist info for each track on the cd, I would like to have an interface allowing me to read the info off of the cd in my cd-rom drive. My question: ...

27. reading from a file in real time.    coderanch.com

I need to read from a huge file and analyse the data and then write it in the excel file. The process should be real time. i.e. when the data is available, the program should start reading it and when it is not, program should wait till it gets available. What java API should I refer to? Please respond. Tejaswini

28. plz help, trying to read from a file...    coderanch.com

I want to write a Java program that reads from the logfile while it is being generated. What I understand from the logfile is, records of website traffic are added to the logfile as the website receives hits.. The website in question doe not receive any hits after end of the day. I have written a program that analyses the logs ...

29. read jimi package    coderanch.com

30. reading jimi package    coderanch.com

31. Problem regarding reading a String    coderanch.com

hello, I'm doing a program of uploading a file from a swing application rather than a browser through a servlet . For that i've made a test program which is running successfully but a small problem is coming in the output,When I'm printing the string obtained through BufferedReader the concatenation operators are also getting printed int the output .i want to ...

32. problem while reading from file    coderanch.com

33. Reading a UTF-8 Encoded File    coderanch.com

Hi All, I've written a program which parses several templates inserting relevant values and then writes them to a new file. When I read a UTF-8 encoded file created using notepad and saved as UTF-8 encoded text, a junk (unknown) character gets inserted as the first character of the resultant string created from the incoming stream. If I write the String ...

34. reading    coderanch.com

35. Read a File to a Text area    coderanch.com

Take a look at FileReader and BufferedReader in the JavaDoc. I think there's an example right in there of setting up to read a file. That will let you one line at a time into a string variable. Can you get from there into your text area? If you're a little more adventurous, and the file is not megabytes long, JDK ...

36. Object Read problem    coderanch.com

I am using this code from front end(applet) to write the object to ObjectOutputStream. And I am reading the object from the servlet using Object Input stream, its actually applet-servlet communication. I am getting java.io.EOFException in the backend when servlet reads the object. //Applet Code String location = "Java"; servletConnection.setRequestProperty( "Content-Type", "application/x-java-serialized-object"); OutputStream outstream = servletConnection.getOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(outstream); ...

37. reading file    coderanch.com

Dear Readers, Here is what I saw the Java API. You can make use of it: listFiles public File[] listFiles()Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of File objects is returned, one for each ...

38. how to read file    coderanch.com

39. Reading a file only if it exists    coderanch.com

40. Reading a us-ascii file    coderanch.com

42. Reading a file from a spot other than the beginning    coderanch.com

Hey everybody. Given a file, I am trying to read a series of bytes that begin at a place other than the beginning of the file (e.g: I'm trying to read 512 bytes from a 1 MB file starting with the 90th byte). Is there any way to do this without reading in or processing the bytes before it? I've tried ...

43. Reading from File    coderanch.com

I am using random file to write some data delimeted by '$' sign. There is a function which reads the data from file. but at time when it reads, it takes some strings which are not there in the file. why is this happening? Is it because there is a limit to the number of characters that can be read. At ...

44. Reading A Character then the next    coderanch.com

You can use FileReader to read files a character at a time. If you need to know when you have a hit a new line, you will need to check for the appropriate character code. Alternatively, you could use a BufferedReader to read a whole line at once, and then iterate through the returned String using the charAt(int i) method.

45. Read Timed out    coderanch.com

Hi, I don't know if it is the good list to post this message. I've a servlet deployed on a web server. The servlet is reading an InputStream from the HttpServletRequest. The InputStream contains xml text and the xml is parsed when the request is posted. When I've a huge number of web clients sending a request at the same time ...

46. Read .dsp file    coderanch.com

Hi, I have a file called input.dsp. I don't know what it is actually. As part of my project, I was given this file and need to read this file from the hard disk. Could anybody tell me whether java.io is possible to do so. If not, what else can i try?

47. Read .dsp file cont.    coderanch.com

Hi, I have a file called input.dsp. I don't know what it is actually. As part of my project, I was given this file and need to read this file from the hard disk. When the BufferedReader reads this file, an exception occurs. The exception says encountered character that is not the character set. Could anybody tell me whether java.io is ...

48. problem reading String    coderanch.com

I have a really stupid problem reading a String but I don't know how to solve it. The thing is that I have a string in the format: "word1 ## word2 ## word3" And I want to have in separate variables those words so I've built a function to get them (I know I colud use Scanner funcitions but I need ...

49. Reading File    coderanch.com

Here are a few things to think about ... I'm sure there are more options If you have fixed length records that are sorted on a key field (big ifs) you can use RandomAccessFile to do a binary search and home in on the record you want. Try reading the whole file into memory. If the records have a key field, ...

50. reading a graphic file.    coderanch.com

I am building a spider for our company that will need to copy the HTML along with the pictures on the pages. Since I am rather new to Java IO, I was wondering if someone can help me on what type of input stream or reader to use. Perhaps a few lines of snippet will be very helpful.

51. Reading Comments inside strings    coderanch.com

Good Afternoon. I have been working on reading through a file and retrieveing information. In this file are also included comments( // and /*...*/). I have so far been able to remove comments. However I later realised that one can have the following: String s1= new String("This is what a comment is \* blah blah *\"); I used the following: Pattern ...

52. Reading a Character    coderanch.com

53. problem in read    coderanch.com

Please explain your problem more clearly. In the source code you posted, there's nothing that reads an object. Look at the exception message. It most likely includes a stack trace, that indicates exactly at which line in which source file the exception happened. Go to that location in your source file and find out what's happening. Please copy and paste the ...

54. Cancelling out of a blocking read operation    coderanch.com

I have what I presume is a common need here. I'm working on a desktop client application that opens a socket to talk to an HTTP server (this will probably always be Tomcat/servlets, but that shouldn't matter). The portion of code I'm concerned about looks something like this: s = new Socket(host, port); PrintStream psout = new PrintStream(s.getOutputStream()); BufferedReader in = ...

55. Reading files in the memory    coderanch.com

Hi! I am writing a code that will get image properties such as length and width in inches from a particular file. I was able to do it however my method does this by reading a physical file through InputStream. My problem is that i have the file in the memory, but then i have to write in in file using ...

56. Reading Java File    coderanch.com

Hi, If i want to read a Java Application program and save it into my program, is the code below is the right one? I mean, reading lines is the correct approach or is there another way? try { FileInputStream f = new FileInputStream("My_File.txt"); BufferedReader input = new BufferedReader(new InputStreamReader(f)); String line; while ((line = input.readLine()) != null) { fileCollection.add(line); } ...

58. Read A File From Bottom Up    coderanch.com

If your lines are all exactly the same length you can do it pretty easily with RandomAccessFile. I'd bet that's not the case, tho. You could invent your own BackwardsBufferedReader using RandomAccessFile to load one "buffer" at a time from the end and return the contents from the last \n to the end, etc. In fact that would be pretty amusing. ...

59. reading files    coderanch.com

hi , i want to read a file which is in current directory that also has other java programs.How can i get the file object for that file with out giving the whole directory i.e i dont want to give File f1=new File("c:\mypack\first\eample.txt"); i might move this application any other systems.i cant chnge the path each time i move the application ...

60. Reading blocks of data from files    coderanch.com

hi i have a small problem. hope somebody helps me out. i will be able to explain myself better if i present a c++ program logic to read a file with structures. in c++ we would.. step 1. create a structure like struct { int a; int b float c; }obj1; step 2. open a file and read the contents of ...

61. How to read a file available in a remote machine?    coderanch.com

Hi, I don't know what do you mean by read a file, but I can tell you that you can create a File object of a file you've got in another pc in a LAN, just give the direction of the file when creating the object and it works perfectly. Hope this helps.

62. doubt in reading object file    coderanch.com

hi , this is my code FileInputStream in=new FileInputStream("Data"); ObjectInputStream ois=new ObjectInputStream(in); Person readPersonData = (Person)ois.readObject(); while((readPersonData = (Person)ois.readObject()) != null){ System.out.println(readPersonData.toString()); } ois.close(); while reading an object file i am getting this error name =vino sex=f name =ramar sex=m Exception in thread "main" java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2502) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) please help me

63. blocking read method    coderanch.com

hi all, I have a typical networking problem, where a clientSocket sends data to a serverSocket. While the client is transmitting a file, and in the middle of it, if client's network fails then at the server end the stream's read method seems to go in infinite loop. Most craziest part is even after a long time it doesn't seem to ...

64. File reading    coderanch.com

got a quick question. Im writing a string of text to a text file with this code: // s is for the string //field1.getText() is the name of the file to be opened FileOutputStream fos = new FileOutputStream(field1.getText()); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(s); field2.setText("File has been Written!!"); oos.close(); but when i try to open the file again it doesent seem ...

65. another File reading problem    coderanch.com

Now a new problem has occured. Let me just say that im taking the text from a textarea, so its more than one line of text. and im writing to a file like this: try{ BufferedWriter b = new BufferedWriter(new FileWriter(field1.getText())); b.write(s); System.out.println(b); field2.setText("File has been Written!!"); }catch(Exception e) { System.out.println(e); } Then to print the text back on another text ...

66. How to read tab delimited file    coderanch.com

How to read and parse tab delimited file using JDK 1.3 API. In 1.4 we have split function in string that takes regualr expression as parameter but how to achieve this in JDK 1.3. Unfortunately I am stuck up with a project that still uses jdk 1.3 and I am on a short deadline. Any help would be appreciated. Thanks, Sunil ...

67. reading in file    coderanch.com

hello i am trying to write a program that reads in a file that can contain up to 1000 lines. The file contains a bunch of names(string), ages(int), a talent(string),and five scores(doubles). My program has to read the file store the names, ages, and all that stuff into arrays(1D). Reading in the the names were easy but now am trying to ...

68. How to read Advanced properties of wmv file    coderanch.com

Dear All, I am creating a small application which reads some wmv media contents from hard disk and updates database as well. Now while updating record for these media file i need to access following properties for a wmv or wma content 1- duration 2- width and hight All these properties are being shown in Advanced properties of the file property ...

69. file reading trouble    coderanch.com

This doesnt work for some reason... its not reading it right from my file i think... any suggestions? public void actionPerformed(ActionEvent e) { accountFrame.setVisible(false); fullPassword = passwordField.getText(); int bLoop = 0; File fileWithPassword = new File(fullName + "/password.rpg"); if(fileWithPassword.exists() == true) { String realPassword; try { String passwordFileDirectory = fullName + "/" + "password.rpg"; BufferedReader fileReader = new BufferedReader(new FileReader(passwordFileDirectory)); realPassword ...

70. Reading set of files    coderanch.com

How to read and fetch data from a set of text files say, some 20 files from a same folder.? I also need to campare the file names and put a particular file in some other location. I have tried to create array of file objects, but how to add the files to the array. I am a fresher and my ...

71. Reading binary data    coderanch.com

Hi All, I do have a file in binary format which has got EBCIDC data. I want to read this file byte by byte.Once read then I need to compare the code page of EBCIDC with tht of ASCII. My main task is to convert the EBCIDC data to ASCII format. Plz i need the code very urgently. Regards Nikhil

72. Stall when reading variable    coderanch.com

I'm currently having an issue with an Piped input/output situation. The program is stalling everytime it get so the .read() and is not getting to the finished read statment. I could use some help explaining why this is the case. Here is the code: //WHERE THE BYTE ARRAY IS CREATED byte[] byteArray = "abc".getBytes(); PipedOutputStream PoS = new PipedOutputStream(); PipedInputStream PiS ...

73. Reading File in a Buffer    coderanch.com

74. How to read a html page from internet.    coderanch.com

This is my code which i write on the main method. It compile and execute fine but did not show the result. try { URL url = new URL("http://seriouswheels.com/cars-a.htm"); BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream())); String str; while ((str = br.readLine()) != null) { System.out.println(str); } in.close(); } catch (MalformedURLException e) { } Actually if you see the site there is ...

75. java read from barcode machine    coderanch.com

You'll have to find the doc on the barcode reader and see what kind of interfaces it provides. Best case: the vendor has a Java jar with nifty APIs. A distant 2nd: the vendor has C/C++ APIs and you can use JNI to talk to them. There may be other options such as proprietary interprocess calls. All depends on the reader. ...

76. file read    coderanch.com

Hi I have a java file which is reading data from a file. Now it has several data lines for region ret,met,pet like ret|0| 2006-09-25| ret|0| 2006-09-24| ret|0| 2006-09-23| but it is reading only one data each region ,leaving other data for same reagion on different date any idea? Pattern p = Pattern.compile(regex); while((line = br.readLine()) != null) { //System.out.println("Line: " ...

77. read issue    coderanch.com

Hi i have a java file which is reading from a txt file . but it is not reading all data.it is reading some line then leaving ,then again reading ,then leaving any idea? both files are below 1) package com.dhl.auditdatamgr.utils; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; import java.util.ArrayList; ...

78. reading unc file    coderanch.com

79. Reading files of size >100MB    coderanch.com

Hi, I have an application which requires to read data from files. The file sizes can be >100MB also. I used BufferedReader to read the data from the file , I get the "out of memory " exception when large files are being read. My development enivironment is windows, though actually I would be deploying it in Unix. Is this exception ...

80. how to read a file    coderanch.com

81. How to read a file    coderanch.com

Hi All, I have a file inboxConfig.xml which is under projectname/context. my project path is showing as C:\eclipse. here is the code i written to read xml file public class XMLReader { public void getInboxDetails(){ try { System.out.println("project path"+new File(".").getCanonicalPath()); DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse (new File("inboxConfig.xml")); // normalize text representation doc.getDocumentElement ().normalize (); ...

82. Reading the contents of a file    coderanch.com

Hi, I have the following code, which takes a file as input; reads through each line (each line is a filepath); and then opens each file that is listed in the input file. Right now, I am having problems opening the initial input file, where it jumps straight to my catch statement saying that it can't open the file. Below is ...

84. unsynchronized file reading    coderanch.com

Hi, I am using WSAD,log4j for logging.If i want to see the log, I need to stop the server, then only I can open the log file. cos the log is locked by server. is there any solution in Java to read the log file, at the same time the server is running. Thanks in advance

86. Read subdirectories and count files?    coderanch.com

Hello i need some help on counting total files in each subdirectories . I already has a method reading the directories, but not sure how to count file for each subdirectories. I need to have the output like this. For example I read from c:\temp result will like this: c:\temp\one\ 3 (assume this sub-directory have 3 files) c:\temp\one\two 10 (assume this ...

87. Read short DOS filename    coderanch.com

Hello, my dad wants to list the MSDOS short file names: i.e. afilename.txt = afilenam~.txt I know that the java.io.File does not implement a method for returning such a short name. Is there any MSDOS-FILE-API able to do that. Is there any algoriothm to compute the short filename from the long one? I'm thankful for any suggestions. Greets Dirk

88. Reading File in Chunks    coderanch.com

Hi Rancher I have a File object that is representing a CSV file. I want to read that file in chunks e.g say first time i read 50 records and next time i want to jump at 51st record and read next till 100th. Is there any way to access the file data randomly. Please help Thanks

89. Reading file in and sperating it out :URGENT    coderanch.com

Hey all, Im really stuck.Im trying to select a file and read its data.I want to seperate this data out so I can assign it to variables. I dont know if i need input streams???.Could someone please help me...... //imports are all corect [using eclipse] public class Analyser extends JFrame implements ActionListener { private Container container; private JPanel buttonsPanel; private JButton ...

90. Reading from a config file    coderanch.com

Hello all, I am a C++ programmer but a newby to Java, so I would appreciate if anyone could help me with the following simple situiation. I have a config file, which stores usernames together with hashed passwords, for example: user1, hash1; user2,hash2; * How can I retrieve these values from my Java application ? Can anybody provide me links to ...

91. Reading a file    coderanch.com

hi Everyone In a text file i have the following text in one single line "Past Due 0 to 89 Days Ago 4/7/2007" "Christine Connors" "Christine_Connors@intuit.com" "Laura Lerner" "Laura_Lerner@intuit.com" "1385 - Workplace Harassment Prevention for Leaders (Online)" I want to read only the names and the email id ommiting the "Past Due 0 to 89 Days Ago 4/7/2007" part. Can anyone ...

92. Read from barcode readers    coderanch.com

Hello my dear friends, Can anybody explain me how to extract the barcode id from a barcode reader. I need my application to capture the id automatically when a barcode label is shown to the reader. Simply say a jsp with a form has a textfield when the client show the barcode lable to the reader it has to capture the ...

93. Read binary data    coderanch.com

hi, I am reading binary data from a binary file. Now I have no idea of it. I have some question to ask. 1) Are the strings ZeroStrings or FixedZeroStrings? 2)How to position the position of each strings? My binary input is space delimited with fixed width data fields. All integers are 4 bytes, floats are 8 bytes, strings are 4 ...

94. reading -1 from file ?    coderanch.com

Hm - the read() method certainly can return -1, but that's different from indicating that there's a -1 in the file. I believe that's the point of the question. Ajay, how was the -1 stored in the file? Is it a text file? Or some kind of binary format? If it's a text file, then assuming it uses a common ASCII-like ...

95. Question on Channel.read() implementation    coderanch.com

Hey i dont have any idea about the Grizzly framework. But most probably the code here is trying to handle a scenario, where select has returned a channel that either is not ready for a read(this should not be the case if the interest set entry is correct for this channel) or the data has been read and processed by some ...

96. reading whith while loop from serilizable file    coderanch.com

Hi, I'm doing a class project about input output with serilizable projects and I'm not sure what I should use to get stuff out of the serilized file. Last time we used csv and used while(it.hasMoreTokens), but this time its a serialized file and I don't know what condition to use. The file has multiple objects. I wrote an arraylist out ...

97. Reading a Character    coderanch.com

ok, Hello, I need to make a simple 'Choice' that require a character as input. Example: System.out.println("Please Enter ur Choice: \n 1. Add \n 2. \n Remove 3. Exit"); char c = (char) System.in.read();System.in.read();System.in.read(); The problem here is that, if the user does not input anything & press [Enter] directly, There will still be a "System.in.read();" remaining (forcing him to press ...

98. system.in.read method    coderanch.com

hi, i have to use the system.in.read method to read a character )grade A, B, etc) and display the corresponding marks range. I have done the following but i am having 'loss of precision' error. can someone tell me the correct way of inputting a char by sytem.in.read method and it gets out a char and not an integer. also would ...

99. problem in reading a file    coderanch.com

hi, I have attached the file here.while calling this method it will return null value please check it and let me know the scope of the variable.. package com.security.file; import java.io.FileInputStream; import java.io.ObjectInputStream; import java.util.ArrayList; public class FileObjectInputStream { public String getObjetFromFile() { String userHome=null; ObjectInputStream streamInObj=null; userHome=System.getProperty("user.home"); userHome=userHome.concat("\\Application Data\\SecurityPin\\Security.property"); //System.out.println("userhome-->"+userHome); Object listr=null; try { System.out.println("try"); streamInObj=new ObjectInputStream(new FileInputStream(userHome)); System.out.println("after"); listr=streamInObj.readObject(); ...

100. Reading from Excel    coderanch.com

I am trying to read from an excel having 2 rows & 3 columns. The 3rd column is validated to take values from the list ['hre','admin','dm']. We I say emp_sheet = workbook.getSheet(0); it gives the following message in the console : Warning: Cell at C3 not present - adding a blank Warning: Some cells exceeded the specified bounds. Resizing sheet dimensions ...