Dumps field names to byte array. Field names are written as Zero End Strings

@return
772325
public byte[] getKeySetToByteArray() 
    {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        
        char[] buffer = new char[getMaxFieldLenth()];
        
        try
        {
            for ( String s : keys )
            {
                Arrays.fill(buffer, (char)0);
                System.arraycopy( s.toCharArray(), 0, buffer, 0, s.length() );
                dos.writeBytes( new String(buffer) );
            }
        }
        catch  (IOException e)
        {
            System.err.println("Could not write Structure key set to byte array: " + e );
            return new byte[0];
        }
        return baos.toByteArray();
        
    }
1209765
public String dumpFile() {
        final StringBuilder buf = new StringBuilder();
        for (DSLMappingEntry dslMappingEntry : this.mapping.getEntries()) {
            buf.append(dslMappingEntry);
            buf.append("\n");
        }
        return buf.toString();
    }
960490
private static String[] getObjValues(Object source, String... fieldnames) throws Exception {
        String[] results = new String[fieldnames.length];
        Field field;
        String value;
        Object obj;
        for (int i = 0; i < fieldnames.length; i++) {
            field = FieldUtil.getField(source, fieldnames[i]);
            if (field == null) {
                continue;
            }
            obj = field.get(source);
            if (obj == null) {
                value = "";
            } else if (obj instanceof Date) {
                value = DateUtil.smartFormat((Date) obj);
            } else {
                value = String.valueOf(obj);
            }
            results[i] = value;
        }
        return results;
    }
92086
public Enumeration getFieldNames()
    {
        return new Enumeration()
            {
                int i=0;
                Field field=null;

                public boolean hasMoreElements()
                {
                    if (field!=null)
                        return true;
                    while (i<_fields.size())
                    {
                        Field f=(Field)_fields.get(i++);
                        if (f!=null && f._version==_version && f._prev==null)
                        {
                            field=f;
                            return true;
                        }
                    }
                    return false;
                }

                public Object nextElement()
                    throws NoSuchElementException
                {
                    if (field!=null || hasMoreElements())
                    {
                        String n=field._info._name;
                        field=null;
                        return n;
                    }
                    throw new NoSuchElementException();
                }
            };
    }
849302
@SuppressWarnings("unchecked")
	@Override
	public Collection<String> getCopyFields() {

		Indexed indexedAnnotation = getIndexAnnotation();
		if (indexedAnnotation != null && indexedAnnotation.copyTo().length > 0) {
			return CollectionUtils.arrayToList(indexedAnnotation.copyTo());
		}
		return Collections.emptyList();
	}
1346322
public String[] getValueNames() {
        if (!_iSession.isValid())
            throw new IllegalStateException();
        Enumeration enumeration = this.getAttributeNames();
        Vector valueNames = new Vector();
        String name = null;
        while (enumeration.hasMoreElements()) {
            name = (String) enumeration.nextElement();
            valueNames.add(name);
        }
        String[] names = new String[valueNames.size()];
        return (String[]) valueNames.toArray(names);
    }
768773
def pack(self):
        
        # Generate a buffer big enough to hold the packed values
        data = bytearray(b"\x00" * self.size)

        # Iterate over the fields, pack each value in little-endian format and
        # insert into the buffered data.
        for field in six.itervalues(self.fields):
            packed_data = struct.pack(b"<" + field.pack_chars, field.default)
            data[field.offset:len(packed_data)+field.offset] = packed_data

        return bytes(data)
784170
public JField []getDeclaredFields()
  {
    ArrayList<JavaField> fieldList = getFieldList();
    
    JField[] fields = new JField[fieldList.size()];

    fieldList.toArray(fields);

    return fields;
  }
999102
public static String encodeFieldData(BaseField field)
    {
        if (field.getData() == null)
            return DBConstants.BLANK;
        ByteArrayOutputStream baOut = new ByteArrayOutputStream();
        DataOutputStream daOut = new DataOutputStream(baOut);
        try {
            field.write(daOut, false);
            daOut.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
        char[] chOut = Base64.encode(baOut.toByteArray());
        if (chOut == null)
            return DBConstants.BLANK;   // Never
        return new String(chOut);
    }
543686
@JSONField(serialize = false)
    public String[] getXhashNames() {
        List<Obj> xhash = getXhash();
        String[] xhashNames = new String[xhash.size()];
        for (int i = 0; i < xhash.size(); i++) {
            xhashNames[i] = xhash.get(i).getName();
        }
        return xhashNames;
    }
481712
function(){
        var fieldNames = [], i, n = this._fieldCount;
        for (i = 0; i < n; i++) fieldNames[i] = this.fieldOrder[i];
        return fieldNames;
    }
1098159
public static void dumpBeansNames() {
		DefaultListableBeanFactory f = (DefaultListableBeanFactory) context.getBeanFactory();
		String[] beanDefinitionNames = f.getBeanDefinitionNames();
		for (String name : beanDefinitionNames) {
			JK.print(name, " for class :", f.getBean(name).getClass().getName());
		}
	}
879922
public char[] toCharArray() {
        final char[] b = new char[this.len];
        if (this.len > 0) {
            System.arraycopy(this.array, 0, b, 0, this.len);
        }
        return b;
    }
1020820
public static String[] getFieldNames(Class clazz) {
	Field[] fields = clazz.getFields();
	String[] names = new String[fields.length];
	for (int i = 0; i < names.length; i++) {
	    names[i] = fields[i].getName();
	}
	return names;
    }
698946
public static java.util.List<String> toAllGetterNames(JavacNode field) {
		return HandlerUtil.toAllGetterNames(field.getAst(), getAccessorsForField(field), field.getName(), isBoolean(field));
	}
242663
public byte[] toArray() {
        if (size() > Integer.MAX_VALUE)
            throw new IllegalStateException("Cannot create byte array of more than 2GB");

        int len = (int) size();
        ByteBuffer bb = toDirectByteBuffer(0L, len);
        byte[] b = new byte[len];
        // Copy data to the array
        bb.get(b, 0, len);
        return b;
    }
35010
public char[] toCharArray() {
        if (size == 0) {
            return ArrayUtils.EMPTY_CHAR_ARRAY;
        }
        final char chars[] = new char[size];
        System.arraycopy(buffer, 0, chars, 0, size);
        return chars;
    }