{"id":26906149,"url":"https://github.com/msh-trojan/java_21_record_random_acces_file_1s","last_synced_at":"2025-07-01T09:06:24.809Z","repository":{"id":251983880,"uuid":"837724204","full_name":"MSH-trojan/Java_21_Record_Random_Acces_File_1s","owner":"MSH-trojan","description":"Programs that will Create a Random Access File, write on this file and read from it. and lastly, display all the class's objects of the type record.","archived":false,"fork":false,"pushed_at":"2024-08-06T21:36:36.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T20:38:49.700Z","etag":null,"topics":["ioexception","java","random-access-file","read-write","try-catch"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MSH-trojan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-03T20:39:44.000Z","updated_at":"2024-08-06T21:36:38.000Z","dependencies_parsed_at":"2024-08-07T00:41:45.215Z","dependency_job_id":"30e8d16d-02bc-4f5f-b86d-024c483655a6","html_url":"https://github.com/MSH-trojan/Java_21_Record_Random_Acces_File_1s","commit_stats":null,"previous_names":["msh-trojan/java_21_record_random_acces_file_1s"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MSH-trojan/Java_21_Record_Random_Acces_File_1s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_Record_Random_Acces_File_1s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_Record_Random_Acces_File_1s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_Record_Random_Acces_File_1s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_Record_Random_Acces_File_1s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MSH-trojan","download_url":"https://codeload.github.com/MSH-trojan/Java_21_Record_Random_Acces_File_1s/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MSH-trojan%2FJava_21_Record_Random_Acces_File_1s/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933312,"owners_count":23386783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ioexception","java","random-access-file","read-write","try-catch"],"created_at":"2025-04-01T11:00:09.953Z","updated_at":"2025-07-01T09:06:24.781Z","avatar_url":"https://github.com/MSH-trojan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"description:\n\n1 - Comments about Record.java:\n\nRandomAccessFile with objects of Record type \nReads or writes data using the file-position pointer\nReads one object at a time to file with obj.read(file)\nWrites one object at a time to file with obj.write(file)\nBoth methods read() and write() use array of bytes instead of Strings to ensure that data is not larger than the size of the Record object \nIn this example the size is 42 bytes, with the encapsulated Strings maximum 15 bytes.\nThere is no need to separately compile Record.java.  Compiling any java file containing the word Record will create Record.class.\n\n\n2- comments about CreateRandFile.java:\n\nThis Java application creates an empty Random-Access file called “credit.dat” containing 100 objects of Record type. \nThat is done with a loop containing  blank.write( file );  where blank = new Record(); \nThe size of the file credit.dat is 4200 bytes. \n\n\n3 - comments about WritRandFile.java:\n\nThis JFrame application allows the user to enter data in the empty Random-Access file “credit.dat”.\nIt uses a simple GridLayout(5,2) with labels,textfields and two buttons.\nThe “Enter” button will write into the file a record containg the textfields data. The line output.seek( (long) ( acctNum-1 ) * data.size() );  is used to position the file pointer to the correct position. The variable acctNum corresponds to account number entered in the corresponding textfield.\n\n\n4 - Comments about ReadRandFile.java:\n\nThis JFrame application allows the user to read data from the Random-Access file “credit.dat”.\nIt uses the same simple GridLayout(5,2) with labels,textfields and two buttons.\nThe use of “Next” button will trigger the method readRecord() which uses the line data.read(input);  to transfer a Record from input to the empty Record object data.  \nA loop is used to ignore the file empty Records, which the account numbers equal to zero.\n\n\n5 -  Comments about ListRecords.java:\n\nThis JFrame application reads all data from the  Random-Access file “credit.dat” and creates an array of Record objects using the non-empty objects.  \nThe sorted array is displayed in a text area using a specified format, with the customers names and balances.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsh-trojan%2Fjava_21_record_random_acces_file_1s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsh-trojan%2Fjava_21_record_random_acces_file_1s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsh-trojan%2Fjava_21_record_random_acces_file_1s/lists"}