Java examples for File Path IO:Text File
write Fixed String to DataOutput
//package com.java2s; import java.io.*; public class Main { public static void writeFixedString(DataOutput out, int length, String s) throws IOException { for (int i = 0; i < length; i++) { if (i < s.length()) out.writeChar(s.charAt(i)); //write char else/* www . j av a2s . c om*/ out.writeChar(0); //write Unicode zero } } }