PAN> io = boost::iostreams;

<SPAN CLASS='keyword'>class</SPAN> my_source {
<SPAN CLASS='keyword'>public</SPAN>:
    <SPAN CLASS='keyword'>typedef</SPAN> <SPAN CLASS='keyword'>char</SPAN>        char_type;
    <SPAN CLASS='keyword'>typedef</SPAN> source_tag  category;

    std::streamsize read(<SPAN CLASS='keyword'>char</SPAN>* s, std::streamsize n)
    {
        <SPAN CLASS='comment'>// Read up to n characters from the underlying data source</SPAN>
        <SPAN CLASS='comment'>// into the buffer s, return