ËÒÏÍÅ FileMapException É Storage


2013/11/12 ïÌØÇÁ å×ÇÅÎØÅ×ÎÁ çÏÒÂÁÞÅ×Á <olga.gorbacheva@phystech.edu>

> ðÏ-ÍÏÅÍÕ ÎÉÞÅÇÏ ÎÅ ÉÓÐÏÒÔÉÔØÓÑ,ÅÓÌÉ ÐÒÏÓÔÏ ×ÙËÉÎÕÔØ ÐÁÐËÕ filemap
>
>
> 2013/11/12 Fedor S. Lavrentyev <notifications@github.com>
>
>> In src/ru/fizteh/fivt/students/olgagorbacheva/filemap/ReadWrite.java:
>>
>> > +      }
>> > +
>> > +      public void write(File dataBaseFile, Map<String, String> storage)
>> > +                  throws FileNotFoundException, IOException {
>> > +            RandomAccessFile writer = new RandomAccessFile(dataBaseFile, "rw");
>> > +            writer.setLength(0);
>> > +
>> > +            Integer offset = countOffset(storage);
>> > +            ArrayList<String> values = new ArrayList<String>();
>> > +
>> > +            Iterator<Map.Entry<String, String>> it = storage
>> > +                        .entrySet().iterator();
>> > +
>> > +            while (it.hasNext()) {
>> > +                  Map.Entry<String, String> elem = it.next();
>> > +                  writer.write(elem.getKey().getBytes("UTF-8"));
>>
>> ÷ÍÅÓÔÏ string.getBytes("UTF-8") ÍÏÖÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ
>> string.getBytes(StandardCharsets.UTF_8. ïÎÏ ÎÅ ÉÝÅÔ ËÏÄÉÒÏ×ËÕ ÐÏ ÉÍÅÎÉ É
>> ÎÅ ËÉÄÁÅÔ ÉÓËÌÀÞÅÎÉÊ.
>>
>> --
>> Reply to this email directly or view it on GitHub<https://github.com/dkomanov/fizteh-java-2013/pull/322/files#r7575048>
>> .
>>
>
>