import java.io.File;
import java.io.FileInputStream;
import java.io.PrintStream;
/*
* Created on 25 . 01 . 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @ author Jens
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Umbruch {
static String [] Silben = new String[20000 ];
static String s="" ;
static int sp=0 ;
public static void AddOne() {
//boolean f=false;
for (int i=1 ;i<sp;i++) {
f=f | (Silben[i].equals(s.toLowerCase()));}
if (!f) {
Silben[sp]=s.toLowerCase();
sp++;
}
s="" ;
}
public static void AddPuffer(byte [] b) {
for (int i=0 ;i<b.length;i++) {
char c=(char )b[i];
if (b[i]>127 ) System.out.println("Char:" +c+" = " +b[i]+" found" );
if (c==' ' ){
AddOne(); }
else if (c=='_' ){
AddOne();}
else if (c==13 ){
AddOne();
} else {
s=s+c;
}
}
}
public static void main(String[] args) {
File Silb=new File("Silben.txt" );
File Erg=new File("Ergebnis.txt" );
if (!Silb.canRead()) {
System.err.println("unable to open Silben.txt" );
return ;
}
try {
FileInputStream fi=new FileInputStream(Silb);
int len;byte Puffer []= new byte [1000 ];
while ((len=fi.read(Puffer)) != -1 ) {
AddPuffer(Puffer);
}}
catch (Exception e) {
System.err.println("Exception:" +e.toString());
}
try {
PrintStream fo=new PrintStream(Erg);
for (int i=0 ;i<sp;i++) {
fo.println(Silben[i]);
}
} catch (Exception e) {
System.err.println("Exception:" +e.toString());
}
System.out.println("Finished: " +sp+" Silben erzeugt." );
}
}
Messung V0.5 in Prozent C=97 H=85 G=91
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-09-27)
¤
*© Formatika GbR, Deutschland