Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 296 results for
randomaccessfile
- Page 1
RandomAccessFile Help
Programming
Software Development
12 Years Ago
by bulger2503
Is there a way to add data into a
RandomAccessFile
using seek(long) without writing over the data at that …: [code] public static void main(String[] args) throws Exception {
RandomAccessFile
raf = new
RandomAccessFile
("test.txt", "rw"); raf.writeBytes…
RandomAccessFile
Programming
Software Development
14 Years Ago
by KimJack
… not sure how to get them to read from a
Randomaccessfile
into an array and from an array back to a…
randomaccessfile
. [code] /** Writes a savings account record to the data file @…
Re: RandomAccessFile Help
Programming
Software Development
12 Years Ago
by bulger2503
Sorry I should have mentioned that I am required to use a
RandomAccessFile
and to update the file data each time the HashMap is changed ie. adding a new entry or removing an entry from the file. It's just an annoying assignment that has hardly any real-world application.
RandomAccessFile remove spesific part of the file
Programming
Software Development
12 Years Ago
by dave_t
Hi! How can i remove from a file a spesific line which includes "abc" string by using
RandomAccessFile
libary? Thanks
Little help with RandomAccessFile
Programming
Software Development
15 Years Ago
by VinceAshbySmith
… rest of the data. [CODE] public void writeData(){ try {
RandomAccessFile
raf = new
RandomAccessFile
("test.xml", "rw"); String text…
Help Randomize through a randomAccessFile
Programming
Software Development
12 Years Ago
by Sekhrian
… a random word from the txt file? [CODE]try{
RandomAccessFile
raf = new
RandomAccessFile
("Words.txt", "rw"); guessme = "…
Java Random Access File... Help
Programming
Software Development
15 Years Ago
by Bouras
…else { // open file try { output = new
RandomAccessFile
( fileName, "rw" ); enterButton.setEnabled( true…); writeName( file, getTeam() ); } private void writeName(
RandomAccessFile
file, String name ) throws IOException { StringBuffer buffer = null…
Random Acces Helppppppp
Programming
Software Development
15 Years Ago
by Bouras
…0', ' ' ); } // write a record to specified
RandomAccessFile
public void write(
RandomAccessFile
file ) throws IOException { file.writeInt( getTeamid() ); writeName( …file, getTeam() ); } private void writeName(
RandomAccessFile
file, String name ) throws IOException { StringBuffer buffer = null; if…
Why do I get these symbols when im trying to save data in txt
Programming
Software Development
12 Years Ago
by rayden150
…jbBucar_AMouseClicked SEVERE: null java.io.EOFException at java.io.
RandomAccessFile
.readChar(
RandomAccessFile
.java:695) at rent_autos.Autos.leerCadena(Autos.java:… iPosicion, String sRuta){ boolean bRealizado = true; try {
RandomAccessFile
fRegistro = new
RandomAccessFile
(sRuta,"rw"); fRegistro.seek(iPosicion); codigo = fRegistro…
My own archive format
Programming
Software Development
13 Years Ago
by BDev338
…new byte[(int)src.length()];
RandomAccessFile
outputStr = new
RandomAccessFile
(dst, "rw");
RandomAccessFile
inputStr = new
RandomAccessFile
(src, "rw"….dat"); dataFile.delete(); dataFile.createNewFile();
RandomAccessFile
mainOutStr = new
RandomAccessFile
(dataFile, "rw"); mainOutStr.seek(blockId…
Re: My own archive format
Programming
Software Development
13 Years Ago
by BDev338
…new byte[(int)src.length()];
RandomAccessFile
outputStr = new
RandomAccessFile
(dst, "rw");
RandomAccessFile
inputStr = new
RandomAccessFile
(src, "rw"….dat"); dataFile.delete(); dataFile.createNewFile();
RandomAccessFile
mainOutStr = new
RandomAccessFile
(dataFile, "rw"); mainOutStr.seek(blockId…
Need help resolving errors for a simple program
Programming
Software Development
16 Years Ago
by thejunkie
…int size; private Record data; private
RandomAccessFile
input; private
RandomAccessFile
output; //constructor public Enrol(){ database…arrival=new String(arrivalarray); } public void write(
RandomAccessFile
file)throws IOException { StringBuffer namebuffer, qtybuffer, …
Re: Overwriting the text in the file
Programming
Software Development
15 Years Ago
by ronpar2584
…("Writing error message in the java file");
RandomAccessFile
writeObj = new
RandomAccessFile
(args[0]+"/"+arr[i],"rwd"…("Writing error message in the java file");
RandomAccessFile
writeObj = new
RandomAccessFile
(args[0]+"/"+arr[i],"rwd"…
Hash Table---Urgent Help needed!
Programming
Software Development
14 Years Ago
by scream2ice
…; File filename1=new File("D:\\b.txt");
RandomAccessFile
file=new
RandomAccessFile
(filename1,"rw");//readwrite File filename2=new File…("D:\\c.txt");
RandomAccessFile
file2=new
RandomAccessFile
(filename2,"rw"); protected EqualityTester T; // the equality…
Re: Need help resolving errors for a simple program
Programming
Software Development
16 Years Ago
by thejunkie
…int size; private Record data; private
RandomAccessFile
input; private
RandomAccessFile
output; //constructor public Enrol(){ database…arrival=new String(arrivalarray); } public void write(
RandomAccessFile
file)throws IOException { StringBuffer namebuffer, usernamebuffer, …
Re: hashing and using an external file
Programming
Software Development
10 Years Ago
by rhaylee
…file // Return the string to the caller private String readString (
RandomAccessFile
file, int strLength) throws IOException { char[] chs = … record from the file */ import java.io.*; import java.io.
RandomAccessFile
; public class RandomFile { public static void main( String args[] …
Re: Why do I get these symbols when im trying to save data in txt
Programming
Software Development
12 Years Ago
by JamesCherrill
You seem to be using methods like writeInt, writeDouble on a
RandomAccessFile
. These methods write the data in its internal binary format, so you would expect to see garbage if you try to view those bytes as text.
hashing and using an external file
Programming
Software Development
10 Years Ago
by rhaylee
…store the students’ information by using Java
RandomAccessFile
class. Assumptions: The data structure is … the insert method is: public int insert (
RandomAccessFile
file, Record rec) It returns 0 for successful…a new record Public Methods: public void read (
RandomAccessFile
file) – to retrieve the name and id …
Re: Overwriting the text in the file
Programming
Software Development
15 Years Ago
by ronpar2584
…of the java files //******************************************************************************************** {
RandomAccessFile
raf = null; //To …arr[i],true);
RandomAccessFile
writeObj = new
RandomAccessFile
(args[0]+"/&…java file");
RandomAccessFile
writeObj = new
RandomAccessFile
(args[0]+"…
Negative Seek Offset
Programming
Software Development
14 Years Ago
by curtissumpter
… (new String(ch).replace('\0', ' ')); } public void write(
RandomAccessFile
f) throws IOException { f.writeInt(getRecordNumber()); writeString(f, getToolName());…f.writeInt(getQuantity()); f.writeDouble(getPrice()); } public void writeString(
RandomAccessFile
f, String str) throws IOException { StringBuffer buf; if…
Huffman
Programming
Software Development
14 Years Ago
by mostafanageeb
…] [CODE]import java.io.IOException; import java.io.
RandomAccessFile
; import java.util.ArrayList; import java.util.Stack;… public class Compressor { Compressor(
RandomAccessFile
source,
RandomAccessFile
destination) throws IOException {
RandomAccessFile
file = source; StringBuffer input=new StringBuffer(); …
logic error with homemade hash table
Programming
Software Development
13 Years Ago
by theABCasian
…; import java.io.IOException; import java.io.
RandomAccessFile
; import java.util.Scanner; public class MyParcer …the line. */ public static MyHashTable getTable() {
RandomAccessFile
raf = null; MyHashTable readIn = new MyHashTable(); try…import java.io.IOException; import java.io.
RandomAccessFile
; import java.util.Hashtable; import java…
Simple Columnar Encryption problem!
Programming
Software Development
13 Years Ago
by mandy011
… suggest me if any idea [code] public static void encrypt(
RandomAccessFile
f,
RandomAccessFile
d,int columns) throws Exception { d.seek(10); // SEEK….write(f.read()); } } //DECRYPTION FUNCTION public static void decrypt(
RandomAccessFile
f,
RandomAccessFile
d,int columns) throws Exception { f.seek(10); int rows…
Illegal start of expression public static
Programming
Software Development
12 Years Ago
by RinzLove
… count ++; } } public static void save_data() throws Exception {
RandomAccessFile
fo = new
RandomAccessFile
("forder.dat","rw"); fo.writeInt… } } public static void retrieve_data() throws Exception {
RandomAccessFile
fo = new
RandomAccessFile
("forder.dat","rw"); count = …
Re: hashing and using an external file
Programming
Software Development
10 Years Ago
by rhaylee
…} } catch(IOException ioe) { return -2; } } return -1; } public boolean search(
RandomAccessFile
file, String id) { int recordId = Integer.parseInt(id); int hashedId…
help needed 3 errors
Programming
Software Development
17 Years Ago
by fastmike
… rid of it.. [code] import java.io.
RandomAccessFile
; import java.io.IOException; import java.util.StringTokenizer…args[ 0 ] ); } public routing( String inFile ){ try{
RandomAccessFile
file = new
RandomAccessFile
( inFile, "rw" ); String tmp = file.readLine();…
HELP!!
Programming
Software Development
15 Years Ago
by retrob89
…: 1. Adding data to an instance of the
RandomAccessFile
class by direct manipulation of the file pointer using…method 2. Deleting data from an instance of the
RandomAccessFile
class by direct manipulation of the file pointer using…. Searching for specified data in an instance of the
RandomAccessFile
class. 4. Recursion 5. Merging two or more …
Help with Java Address Book
Programming
Software Development
14 Years Ago
by guerrund
… + STATE_SIZE + RECORDNUM_SIZE + ZIP_SIZE); // Access address.dat using
RandomAccessFile
private
RandomAccessFile
raf; // Text fields private JTextField jtfName = new JTextField(NAME_SIZE);…or create a random access file try { raf = new
RandomAccessFile
("address.dat", "rw"); } catch(…
JAVA:How to write data in a new line in a particular text file?
Programming
Software Development
14 Years Ago
by cristine.apin
… particular text file? Is there any particular method in the
RandomAccessFile
class in java that is capable of handling such thing…(); str = str.trim(); File file = new File(str); try{
RandomAccessFile
rand = new
RandomAccessFile
(file, "rw"); rand.seek(file.length()); rand…
infile outfile help
Programming
Software Development
13 Years Ago
by kesh1000
…FileNotFoundException; import java.io.IOException; import java.io.
RandomAccessFile
; import java.io.*; class customers{ private String cus_id…cus_add; private String cus_email; private
RandomAccessFile
raf; public customers(){ try { raf = new
RandomAccessFile
("Pass.dat", "…
1
2
3
5
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC