Olası Çoğalt yapma:
How to create a Java String from the contents of a filejava bir metin dosyasını okuyup bir karakter dizisinin o
Merhaba ben bir metin dosyası okumak ve mesaj bir dize yapmak istiyorum.
String message = StringUtils.decode(FileUtils.readFileContent(templateResource.getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams());
java ile çok iyi değilim, bu yüzden nasıl çalışır? i okumaya çalışıyorum dosyanın yama: Ben metin dosyasının içeriğini sadece statik vardır belki de kod çözme özelliği kullanmak istemiyorsanız
sms bildirim/bilgi-response.1.txt . O çalışmıyor çünkü
String message = StringUtils.decode(FileUtils.readFileContent("sms-notification/info-response.1.txt".getFile(), templateResource.getCharset(), (int) templateResource.getLength()), notification.getParams()); ?
:
i gibi bir şey yapardı.
aynı şekilde [bir dosyanın içeriklerinden bir Java dize nasıl oluşturulur] (http://stackoverflow.com/questions/326390/how-to-create-a-java-string-from- -içerikleri-of-a-dosyası). –
Anlaşıldı, Matthew. –