2015-06-25 22 views

回答

0

什麼thrift --help說,這是針對Java:

java (Java): 
    beans:   Members will be private, and setter methods will return void. 
    private-members: Members will be private, but setter methods will return 'this' like usual. 
    nocamel:   Do not use CamelCase field accessors with beans. 
    fullcamel:  Convert underscored_accessor_or_service_names to camelCase. 
    android:   Generated structures are Parcelable. 
    android_legacy: Do not use java.io.IOException(throwable) (available for Android 2.3 and above). 
    option_type:  Wrap optional fields in an Option type. 
    java5:   Generate Java 1.5 compliant code (includes android_legacy flag). 
    reuse-objects: Data objects will not be allocated, but existing instances will be used (read and write). 
    sorted_containers: 
        Use TreeSet/TreeMap instead of HashSet/HashMap as a implementation of set/map. 

因此,答案是:Currently not

1

不是一個字符數組...但你可以用IDL親近這樣的:

namespace java array.test 

struct Test { 
    1: list<byte> passwd; 
    2: binary passwd2; 
} 

list<byte>將生成Java中的java.util.List<Byte>場。

binary將在Java中生成一個java.nio.ByteBuffer字段。

我認爲你應該能夠有效地消除其中的任何一個,以實現你的鏈接問題中描述的內容。