Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31287

How to extend FilterInputStream to convert tabs to spaces?

Newsgroups comp.lang.java.programmer
Date 2015-03-08 06:47 -0700
Message-ID <9753acf9-1cb7-48b8-8a9c-4656d5772c93@googlegroups.com> (permalink)
Subject How to extend FilterInputStream to convert tabs to spaces?
From fangyuncn@gmail.com

Show all headers | View raw


Hi, I need to write a class Tabs2SpaceInputStream, it extends java.io.FilterInputStream. the code snippet like this:

public class Tabs2SpaceInputStream extends FilterInputStream {

	/**
	 * @param in
	 */
	public Tabs2SpaceInputStream(InputStream in) {
		super(in);
	}

	@Override
	public int read() throws IOException {
		// TODO Auto-generated method stub
	}

	@Override
	public int read(byte[] b) throws IOException {
		// TODO Auto-generated method stub
	}

	@Override
	public int read(byte[] b, int off, int len) throws IOException {
		// TODO Auto-generated method stub
	}
	
}

This class is used to convert tabs to space when the under inpustream is read. Who give some help about this issue? Thanks a lot!.

Yun

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How to extend FilterInputStream to convert tabs to spaces? fangyuncn@gmail.com - 2015-03-08 06:47 -0700
  Re: How to extend FilterInputStream to convert tabs to spaces? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-03-08 11:33 -0400
    Re: How to extend FilterInputStream to convert tabs to spaces? Fang Yun <fangyuncn@gmail.com> - 2015-03-09 01:08 -0700
      Re: How to extend FilterInputStream to convert tabs to spaces? Arne Vajhøj <arne@vajhoej.dk> - 2015-04-18 21:10 -0400

csiph-web