Java Problems

Posted by DesertFox on Nov. 14, 2006, 11:08 a.m.

Whee for JTextFields SCREWING UP.

I've got a beautiful simple encrypter/decrypter that uses an 8-digit hexidecimal value (12 decimal value). It works great, oh so fast. Much faster than anything in GM.

To put it nicely, it encrypted a 5mB file in less than a second.

Unfortunately, there is a highly annoying problem when it comes to saving the encrypted file - when it saves the file, it saves differently from as if you copied and pasted.

So, if I copy/paste into one txt file, and save that, and then also save from my program, the two files are different.

*pulls hair*

So I am currently reduced to copy/paste until I fix this problem.

I proudly present Hamlet's Soliloquy, the first bit anyway:

IBONHW?%w-ozAB‘©WÇÈ°]Xâ„¢ÛÇ?O¥Å¾Œ8¾È?á*'O fV“â€?z€ŸkLâ„¢ÛØ)?šýynUUV+5"™ââ€â€?I

0ëÚÖ¦œÃ…Lýõ÷ÅÅFSJâ€?‰â€ ?Ãâ€?îëQJØ…©¶Ã?Vg

Y¨6ðx~MKCI *x¾dgÃ?°§â„¢ÃžCñÃâ€?Ã?Q¥Ã²Ã¼'â´Å‚ˆˆÃ‰Ã¤ÃžNSÕÖg¨Ã‰UQ¹ï©–â€? /9ÝëO†+!"d8ß01ðï´ª/("g1'Ã¥9ðíº{õ)‘B[`~E0„˜I¬¥Ã‡Ã‡ È*浜Ÿ'ïPÀÊqRµÂ®˜˜Ã¥â€¢=?&>Y Çî÷â€?:

!N

ìý¡Ž J½þðæ?“ à4ÉÃ?–â€?ãðÓ†<=_N!Õ

ƺdlZ¤±ª

¹HNàîÅ}AKU?rv´bþ¿±4Úäq²â%‚?HJUU1Ã?lKlßØåäERi½‘BÃ?Ã?­akíêá«

HAMLET: To be, or not to be–that is the question:

Whether 'tis nobler in the mind to suffer

The slings and arrows of outrageous fortune

Or to take arms against a sea of troubles

And by opposing end them. To die, to sleep–

No more–and by a sleep to say we end

Qhe heartache, and the thousand natural shocks

Thaq flesh is heir to. 'Tis a consummation

Devoutly to be wished.

So I can copy/paste that to notepad, and vice versa, and it works, but it writes-to-file funny. I could save the entire things as hexidecimal code, but that doubles the filesize.

I am betting it has to do with ANSI/Unicode problems.

———————————–

No more html linebreaks.

Hoorah! Further testing shows that my filewrite doesnt write properly, for some reason! I opened a JPG image, and just resaved it, and iit screwed up completely!

This is a GOOD thing because I know partially what the problem is.

Comments

Arcalyth 17 years, 11 months ago

Here are the API docs, they might help you.

http://java.sun.com/j2se/1.5.0/docs/api/

flashback 17 years, 11 months ago

You owe me an avatar.