Converted PGUtil stream methods to extension methods