Patent ID: 8717891

Claim:
A shaping apparatus comprising: a plurality of buffers for which a data amount readable within a predetermined time is set as a writable upper limit size and the buffers from which read processing are carried out are sequentially switched on the predetermined time basis; a storage to store a flow information table including for flows of input data on a flow of input data basis specific information for specifying a buffer to write input data for a flow of input data, maximum amount information indicating a maximum data amount writable by the flow of input data in the buffer specified by the specific information, and remaining amount information indicating a remaining data amount writable by the flow of input data in the buffer specified by the specific information; and a shaper that writes the input data in the buffer specified by the specific information from among the plurality of buffers for each of the flows of the input data, wherein for each of the flows of the input data, the shaper updates the remaining amount information of the flow of the input data to a value obtained by subtracting a newly written data amount of the input data in the buffer specified for the flow of the input data from the remaining amount information before the input data is written in the buffer specified for the flow of the input data and repeatedly performs, when the remaining amount information after the update takes a negative value, each operation of updating the specific information to information for specifying a buffer in a next stage as a next buffer to the buffer specified by the specific information and of adding maximum amount information for a flow of input data in the next buffer to remaining amount information for the flow of input data in the next buffer each time the specific information is updated to the next buffer until the remaining amount information for the flow of input data in the buffer takes a positive value.