public FSTObjectInput() throws IOException { this(emptyStream, FSTConfiguration.getDefaultConfiguration()); }
/** * Creates a FSTObjectInput that uses the specified * underlying InputStream. * * @param in the specified input stream */ public FSTObjectInput(InputStream in) throws IOException { this(in, FSTConfiguration.getDefaultConfiguration()); }
/** * Creates a new FSTObjectOutput stream to write data to the specified * underlying output stream. * uses Default Configuration singleton */ public FSTObjectOutput(OutputStream out) { this(out, FSTConfiguration.getDefaultConfiguration()); }
/** * Creates a new FSTObjectOutput stream to write data to the specified * underlying output stream. * uses Default Configuration singleton */ public FSTObjectOutput(OutputStream out) { this(out, FSTConfiguration.getDefaultConfiguration()); }
/** * Creates a FSTObjectInput that uses the specified * underlying InputStream. * * @param in the specified input stream */ public FSTObjectInput(InputStream in) throws IOException { this(in, FSTConfiguration.getDefaultConfiguration()); }
public FSTObjectInput() throws IOException { this(emptyStream, FSTConfiguration.getDefaultConfiguration()); }
/** * serialize without an underlying stream, the resulting byte array of writing to * this FSTObjectOutput can be accessed using getBuffer(), the size using getWritten(). * Note once you call close or flush, the tmp byte array is lost. (grab array before flushing/closing) * * uses default configuration singleton * * @throws IOException */ public FSTObjectOutput() { this(null, FSTConfiguration.getDefaultConfiguration()); getCodec().setOutstream(null); }
/** * serialize without an underlying stream, the resulting byte array of writing to * this FSTObjectOutput can be accessed using getBuffer(), the size using getWritten(). * Note once you call close or flush, the tmp byte array is lost. (grab array before flushing/closing) * * uses default configuration singleton * * @throws IOException */ public FSTObjectOutput() { this(null, FSTConfiguration.getDefaultConfiguration()); getCodec().setOutstream(null); }
public FSTSerializer() { fstConfiguration = FSTConfiguration.getDefaultConfiguration(); fstConfiguration.setClassLoader(Thread.currentThread().getContextClassLoader()); }
public RecordStorage _put(String key, Record value) { if ( protocol != null ) { try { FSTConfiguration.getDefaultConfiguration().encodeToStream(protocol,new Object[] {"putRecord",key,value}); protocol.flush(); } catch (IOException e) { e.printStackTrace(); } } store.put(key,value); return this; }
@Override public Record remove(String key) { if ( protocol != null ) { try { FSTConfiguration.getDefaultConfiguration().encodeToStream(protocol,new Object[] {"remove",key}); protocol.flush(); } catch (IOException e) { e.printStackTrace(); } } Record v = get(key); if ( v != null ) { store.remove(key); v.internal_updateLastModified(); } return v; }