public void readExternal(ArrayInputStream in) throws IOException, ClassNotFoundException { array = new Formatable[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, array); }
/** * Read this object from a stream of stored objects. * * @param in read this. * * @exception IOException thrown on error * @exception ClassNotFoundException thrown on error */ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { triggerArray = new TriggerDescriptor[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, triggerArray); columnIds = ArrayUtil.readIntArray(in); int len = ArrayUtil.readArrayLength(in); if (len > 0) { columnNames = new String[len]; ArrayUtil.readArrayItems(in, columnNames); } }
/** Read an array of strings from an ObjectInput. This allocates the array. @param in the ObjectInput. @return the array of integers. @exception java.io.IOException The write caused an IOException. */ public static String[] readStringArray(ObjectInput in) throws IOException, ClassNotFoundException { Object[] objArray = readObjectArray(in); int size = 0; if (objArray == null) return null; String[] stringArray = new String[size = objArray.length]; for (int i = 0; i < size; i++) { stringArray[i] = (String)objArray[i]; } return stringArray; }
/** * Write this object out * * @param out write bytes here * * @exception IOException thrown on error */ public void writeExternal(ObjectOutput out) throws IOException { ArrayUtil.writeArray(out, triggerArray); ArrayUtil.writeIntArray(out, columnIds); ArrayUtil.writeArray(out, columnNames); }
irgs = new IndexRowGenerator[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, irgs); indexCIDS = ArrayUtil.readLongArray(in); indexSCOCIs = new StaticCompiledOpenConglomInfo[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, indexSCOCIs); lockMode = in.readInt(); fkInfo = new FKInfo[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkInfo); baseRowReadMap = ArrayUtil.readIntArray(in); streamStorableHeapColIds = ArrayUtil.readIntArray(in); singleRowSource = in.readBoolean(); indexNames = ArrayUtil.readStringArray(in);
refConglomNumber = in.readLong(); fkConstraintNames = new String[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkConstraintNames); fkUUIDs = new UUID[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkUUIDs); fkConglomNumbers = ArrayUtil.readLongArray(in); fkIsSelfReferencing = ArrayUtil.readBooleanArray(in); colArray = ArrayUtil.readIntArray(in); raRules = ArrayUtil.readIntArray(in);
/** * Write this object out * * @param out write bytes here * * @exception IOException thrown on error */ public void writeExternal(ObjectOutput out) throws IOException { /* ** Row locations cannot be written unless they ** have a valid value. So we'll just write out ** the format id, and create a new RowLocation ** when we read it back in. */ FormatIdUtil.writeFormatIdInteger(out, rowLocation.getTypeFormatId()); out.writeObject(tableName); out.writeInt(type); out.writeInt(stmtType); out.writeObject(refUUID); out.writeLong(refConglomNumber); ArrayUtil.writeArray(out, fkConstraintNames); ArrayUtil.writeArray(out, fkUUIDs); ArrayUtil.writeLongArray(out, fkConglomNumbers); ArrayUtil.writeBooleanArray(out, fkIsSelfReferencing); ArrayUtil.writeIntArray(out, colArray); ArrayUtil.writeIntArray(out, raRules); }
/** * Write this array out * * @param out write bytes here * * @exception IOException thrown on error */ public void writeExternal(ObjectOutput out) throws IOException { if (SanityManager.DEBUG) { SanityManager.ASSERT(array != null, "Array is null, which isn't expected"); } ArrayUtil.writeArrayLength(out, array); ArrayUtil.writeArrayItems(out, array); }
/** * Write this object to a stream of stored objects. * * @param out write bytes here. * * @exception IOException thrown on error */ public void writeExternal( ObjectOutput out ) throws IOException { super.writeExternal(out); ArrayUtil.writeBooleanArray(out, indexedCols); ArrayUtil.writeArray(out, autoincRowLocation); out.writeObject(schemaName); out.writeObject(tableName); ArrayUtil.writeArray(out, columnNames); ArrayUtil.writeLongArray(out, autoincIncrement); }
public void readExternal (ObjectInput in) throws IOException, ClassNotFoundException { Object[] objectArray = null; super.readExternal(in); indexedCols = ArrayUtil.readBooleanArray(in); // RESOLVEAUTOINCREMENT: this is the new stuff-- probably version!! objectArray = ArrayUtil.readObjectArray(in); if (objectArray != null) { // is there a better way to do cast the whole array? autoincRowLocation = new RowLocation[objectArray.length]; for (int i = 0; i < objectArray.length; i++) autoincRowLocation[i] = (RowLocation)objectArray[i]; } schemaName = (String)in.readObject(); tableName = (String)in.readObject(); objectArray = ArrayUtil.readObjectArray(in); if (objectArray != null) { // is there a better way to do cast the whole array? columnNames = new String[objectArray.length]; for (int i = 0; i < objectArray.length; i++) columnNames[i] = (String)objectArray[i]; } autoincIncrement = ArrayUtil.readLongArray(in); }
ArrayUtil.writeArray(out, irgs); ArrayUtil.writeLongArray(out, indexCIDS); ArrayUtil.writeArray(out, indexSCOCIs); out.writeBoolean(deferred); out.writeObject(targetProperties); out.writeObject(targetUUID); out.writeInt(lockMode); ArrayUtil.writeArray(out, fkInfo); ArrayUtil.writeIntArray(out,baseRowReadMap); ArrayUtil.writeIntArray(out,streamStorableHeapColIds); ArrayUtil.writeArray(out, indexNames);
/** * Write this object to a stream of stored objects. * * @param out write bytes here. * * @exception IOException thrown on error */ public void writeExternal( ObjectOutput out ) throws IOException { super.writeExternal(out); out.writeObject(specificName); out.writeInt(dynamicResultSets); out.writeInt(parameterCount); out.writeShort(parameterStyle); out.writeShort(sqlAllowed); out.writeObject(returnType); out.writeBoolean(calledOnNullInput); out.writeInt(0); // future expansion if (parameterCount != 0) { ArrayUtil.writeArrayItems(out, parameterNames); ArrayUtil.writeArrayItems(out, parameterTypes); ArrayUtil.writeIntArray(out, parameterModes); } }
parameterTypes = new TypeDescriptor[parameterCount]; ArrayUtil.readArrayItems(in, parameterNames); for (int p = 0; p < parameterTypes.length; p++) parameterModes = ArrayUtil.readIntArray(in);
/** * Write this object out * * @param out write bytes here * * @exception IOException thrown on error */ public void writeExternal(ObjectOutput out) throws IOException { out.writeInt(updateMode); out.writeObject(targetTable); ArrayUtil.writeArray(out, targetColumns); ArrayUtil.writeArray(out, updateColumns); }
public static int[][] readInts( ObjectInput in ) throws IOException, ClassNotFoundException { int[][] retVal = null; if ( in.readBoolean() ) { int count = in.readInt(); retVal = new int[ count ][]; for (int i = 0; i < count; i++) { retVal[ i ] = ArrayUtil.readIntArray( in ); } } return retVal; }
/** Reads an array of objects from the stream. @param in Input stream @exception java.io.IOException The write caused an IOException. @exception java.lang.ClassNotFoundException The Class for an Object we are reading does not exist */ public static Object[] readObjectArray(ObjectInput in) throws IOException, ClassNotFoundException { int size = in.readInt(); if ( size == 0 ) { return null; } Object[] result = new Object[ size ]; readArrayItems( in, result ); return result; }
irgs = new IndexRowGenerator[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, irgs); indexCIDS = ArrayUtil.readLongArray(in); indexSCOCIs = new StaticCompiledOpenConglomInfo[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, indexSCOCIs); lockMode = in.readInt(); fkInfo = new FKInfo[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkInfo); baseRowReadMap = ArrayUtil.readIntArray(in); streamStorableHeapColIds = ArrayUtil.readIntArray(in); singleRowSource = in.readBoolean(); indexNames = ArrayUtil.readStringArray(in);
refConglomNumber = in.readLong(); fkConstraintNames = new String[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkConstraintNames); fkUUIDs = new UUID[ArrayUtil.readArrayLength(in)]; ArrayUtil.readArrayItems(in, fkUUIDs); fkConglomNumbers = ArrayUtil.readLongArray(in); fkIsSelfReferencing = ArrayUtil.readBooleanArray(in); colArray = ArrayUtil.readIntArray(in); raRules = ArrayUtil.readIntArray(in);
/** * Write this object out * * @param out write bytes here * * @exception IOException thrown on error */ public void writeExternal(ObjectOutput out) throws IOException { /* ** Row locations cannot be written unless they ** have a valid value. So we'll just write out ** the format id, and create a new RowLocation ** when we read it back in. */ FormatIdUtil.writeFormatIdInteger(out, rowLocation.getTypeFormatId()); out.writeObject(tableName); out.writeInt(type); out.writeInt(stmtType); out.writeObject(refUUID); out.writeLong(refConglomNumber); ArrayUtil.writeArray(out, fkConstraintNames); ArrayUtil.writeArray(out, fkUUIDs); ArrayUtil.writeLongArray(out, fkConglomNumbers); ArrayUtil.writeBooleanArray(out, fkIsSelfReferencing); ArrayUtil.writeIntArray(out, colArray); ArrayUtil.writeIntArray(out, raRules); }