當前位置: 首頁>>代碼示例>>Java>>正文


Java BufferAllocator類代碼示例

本文整理匯總了Java中org.simpleframework.util.buffer.BufferAllocator的典型用法代碼示例。如果您正苦於以下問題:Java BufferAllocator類的具體用法?Java BufferAllocator怎麽用?Java BufferAllocator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BufferAllocator類屬於org.simpleframework.util.buffer包,在下文中一共展示了BufferAllocator類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PartSeriesConsumer

import org.simpleframework.util.buffer.BufferAllocator; //導入依賴的package包/類
/**
 * Constructor for the <code>PartSeriesConsumer</code> object. This 
 * will create a consumer that is capable of breaking an upload in
 * to individual parts so that they can be accessed and used by
 * the receiver of the HTTP request message.
 *
 * @param allocator this is used to allocate the internal buffer
 * @param series this is the part list used to accumulate the parts   
 * @param boundary this is the boundary used for the upload
 * @param length this is the number of bytes the upload should be   
 */    
public PartSeriesConsumer(Allocator allocator, PartSeries series, byte[] boundary, long length) {
   this.buffer = new BufferAllocator(allocator, length);
   this.consumer = new PartEntryConsumer(buffer, series, boundary, length);
   this.factory = new PartEntryFactory(buffer, series, boundary, length);
   this.series = series;
}
 
開發者ID:blobrobotics,項目名稱:bstation,代碼行數:18,代碼來源:PartSeriesConsumer.java

示例2: PartSeriesConsumer

import org.simpleframework.util.buffer.BufferAllocator; //導入依賴的package包/類
/**
 * Constructor for the <code>PartListConsumer</code> object. This will
 * create a consumer that is capable of breaking an upload in to individual
 * parts so that they can be accessed and used by the receiver of the HTTP
 * request message.
 * 
 * @param allocator
 *            this is used to allocate the internal buffer
 * @param series
 *            this is the part list used to accumulate the parts
 * @param boundary
 *            this is the boundary used for the upload
 * @param length
 *            this is the number of bytes the upload should be
 */
public PartSeriesConsumer(Allocator allocator, PartSeries series,
        byte[] boundary, long length) {
    this.buffer = new BufferAllocator(allocator, length);
    this.consumer = new PartEntryConsumer(this.buffer, series, boundary);
    this.factory = new PartEntryFactory(this.buffer, series, boundary);
    this.series = series;
}
 
開發者ID:TehSomeLuigi,項目名稱:someluigis-peripherals,代碼行數:23,代碼來源:PartSeriesConsumer.java


注:本文中的org.simpleframework.util.buffer.BufferAllocator類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。