1 25 26 package org.jrobin.core; 27 28 import java.io.IOException ; 29 30 class RrdString extends RrdPrimitive { 31 RrdString(RrdUpdater updater) throws IOException { 32 super(updater, RrdPrimitive.RRD_STRING); 33 } 34 35 void set(String value) throws IOException { 36 if(cache.setString(value)) { 37 writeString(value); 38 } 39 } 40 41 String get() throws IOException { 42 if(cache.isEmpty()) { 43 cache.setString(readString()); 44 } 45 return cache.getString(); 46 } 47 } 48 | Popular Tags |