public T deserialize( T tuple ) throws IOException { if( tuple == null ) tuple = createTuple(); if( readers == null ) return inputStream.readUnTyped( tuple ); else return inputStream.readWith( readers, tuple ); }
@Override public void serialize( T tuple ) throws IOException { if( writers == null ) outputStream.writeUnTyped( tuple ); else outputStream.writeWith( writers, tuple ); }
public void open( InputStream in ) { if( in instanceof HadoopTupleInputStream ) inputStream = (HadoopTupleInputStream) in; else inputStream = new HadoopTupleInputStream( in, elementReader ); }
public void serialize( T tuple ) throws IOException { outputStream.writeIntInternal( tuple.getIndex() ); Class[] types = getTypesFor( tuple.getIndex() ); if( types == null ) outputStream.writeUnTyped( tuple.getTuple() ); else outputStream.writeTyped( types, tuple.getTuple() ); }
public void open( OutputStream out ) { if( out instanceof HadoopTupleOutputStream ) outputStream = (HadoopTupleOutputStream) out; else outputStream = new HadoopTupleOutputStream( out, elementWriter ); }
private Object readNullBoolean() throws IOException { byte b = this.readByte(); if( b == 0 ) return null; return readBoolean(); }
private Object readNullDouble() throws IOException { byte b = this.readByte(); if( b == 0 ) return null; return readDouble(); }
public void serialize( Tuple tuple ) throws IOException { outputStream.writeTuple( tuple ); } }
public void open( InputStream in ) { if( in instanceof HadoopTupleInputStream ) inputStream = (HadoopTupleInputStream) in; else inputStream = new HadoopTupleInputStream( in, elementReader ); }
public T deserialize( T tuple ) throws IOException { if( tuple == null ) tuple = createTuple(); if( readers == null ) return inputStream.readUnTyped( tuple ); else return inputStream.readWith( readers, tuple ); }
@Override public void serialize( T tuple ) throws IOException { if( writers == null ) outputStream.writeUnTyped( tuple ); else outputStream.writeWith( writers, tuple ); }
private Object readNullBoolean() throws IOException { byte b = this.readByte(); if( b == 0 ) return null; return readBoolean(); }
private Object readNullDouble() throws IOException { byte b = this.readByte(); if( b == 0 ) return null; return readDouble(); }
public void serialize( Tuple tuple ) throws IOException { outputStream.writeTuple( tuple ); } }