Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
po:lab6 [2017/11/30 13:02]
pszwed [Do zaimplementowania]
po:lab6 [2018/11/22 13:40] (current)
pszwed [Funkcje getTime i getDate]
Line 176: Line 176:
   * ''double getDouble(int columnIndex)'' oraz ''double getDouble(String columnLabel)''   * ''double getDouble(int columnIndex)'' oraz ''double getDouble(String columnLabel)''
      
 +=== Uwagi do isMissing() ===
 +<code java>
 +        for(String s:"ala ma kota,12,,,,4,,,,".split(",")){
 +            System.out.println("<"+s+">");
 +        }
 +
 +</code>
 +
 +Wynik
 +
 +<code java>
 +<ala ma kota>
 +<12>
 +<>
 +<>
 +<>
 +<4>
 +</code>
  
 +Brakuje atrybutu jeśli:
 +  * numer kolumny jest poza zakresem ''current.length'' 
 +  * tekst jest pusty
 ===== Napisz testy ===== ===== Napisz testy =====
  
Line 226: Line 247:
  
  
 +===== Zestaw znaków =====
  
 +Poniższy kod pokazuje, jak odczytać/zapisać plik wskazując zestaw znaków
  
 +
 +<code java>
 +        try (BufferedReader input = new BufferedReader(new InputStreamReader( new FileInputStream(inname), Charset.forName("Cp1250")))){
 +            try(PrintWriter output = new PrintWriter( new OutputStreamWriter(new FileOutputStream(outname),"Cp1250"))){
 +                for(;;){
 +                    String line = input.readLine();
 +                    if(line==null)break;
 +                    output.println(line);
 +                }
 +            }
 +
 +</code>
po/lab6.1512043360.txt.gz · Last modified: 2017/11/30 13:02 by pszwed
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0