File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programming Diversions and the fly likes What does this say? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "What does this say? " Watch "What does this say? " New topic
Author

What does this say?

Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
....�-�-�.--.�---...�-..-.�-..-.�.--�.--�.--�.-.-.-�...�-.-.�.--.�....�..�.-..�.-..�..�.--.�...�.-.-.-�-.-.�---�--�-..-.�--�---�.-.�...�.�-..-.�..�-.�-..�.�-..-�.-.-.-�....�-�--�.-..�..--..�....�-�-�.--.�---...�-..-.�-..-.�.--�.--�.--�.-.-.-�...�-.-.�.--.�....�..�.-..�.-..�..�.--.�...�.-.-.-�-.-.�---�--�-..-.�--�---�.-.�...�.�-..-.�-�.-.�.-�-.�...�.-.-.-�....�-�--�.-..�

(hint) Morse code uses '.' for a dot and '-' for a dash, letters have to be separated by spaces and if there are words they have to be separated by '/'.
[ August 28, 2004: Message edited by: Sonny Pondrom ]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

.. / --. ..- . ... ... / .. / --. --- - / .. - / -....- / - .-. .- -. ... .-.. .- - . -.. / .-- .. - .... / -.-- --- ..- .-. / -- --- .-. ... . / \
-.-. --- -.. . / - .-. .- -. ... .-.. .- - --- .-. / .. ..-. / -.-- --- ..- / .-- --- ..- .-.. -.. / .- -.. -.. / .- / ... .--. .- -.-. . / .- -. -..\
/ -. . .-- .-.. .. -. . -....- .. -. -.. .. -.-. .- - --- .-. / .. -. - --- / -.-- --- ..- .-. / -.-. --- -.. . --..-- / - .... . / .--. .- --. . / .-- --- ..- .-.. -.. / .-.. .- -.-- --- ..- - / -- --- .-. . /

[ August 28, 2004: Message edited by: Stefan Wagner ]
[ August 28, 2004: Message edited by: Stefan Wagner ]

http://home.arcor.de/hirnstrom/bewerbung
Sonny Pondrom
Ranch Hand

Joined: Jun 05, 2001
Posts: 128
--. --- --- -.. / .--. --- .. -. - /
[ August 28, 2004: Message edited by: Sonny Pondrom ]
shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
:roll:
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

shankar: I googled for 'morsealphabet', found a table on the second or third hit, cut'n'pasted to my editor.

Then I used 'sed' to convert it to to lines of the form:


and put a

in front - (you see - using 1.5 code)...
and looked the keys up in my map.
Some punctation-characters where missing, but they where easily guessed and the added to the map.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What does this say?
 
Similar Threads
Anonymous Array
JDBC connectivity problem through JSP
Is StringTokenizer a "Java Gotcha" for use in CSV processing?
RMI
File Read & fill Database Using Multithreading