본문 바로가기

스택오버플로우 해석하기

스택오버플로우 해석하기 # 03 명령문

Sentence.

There is no such thing as the size of an input stream. Consider a program which never exits, or a socket peer which never stops sending. And you don't need to know to write it to an HttpResponse header. The Content-length is managed automatically for you.

해석

input stream 에는 size 와 같은 것이 없다. 절대 종료되지 않는 프로그램이나 전송을 멈추지 않는 소켓 피어를 생각해봐라. 그리고 당신은 HttpResponse 헤더에 쓰기 위해서 알 필요가 없다. Content-length 는 자동으로 관리된다.

설명

이 문장은 java InputStream 의 size 문의에 대한 답변입니다.

갑자기 한 문장이 아닌 여러 문장이 나왔죠?

당황하지 말고 간단하니 하나하나 뜯어보도록 하겠습니다!

 

There is no such thing / as the size of an input stream. Consider a program / which never exits, or a socket peer / which never stops sending. And you don't need to know / to write it / to an HttpResponse header. The Content-length is managed automatically for you.

 

문장에서 어려운 문법은 없어 보입니다만 하나하나씩 해석해 보겠습니다.

 

There is no such thing / as the size of an input stream. 

=> 그런건 없다 / input stream 의 size 같은건

  * as + 명사, 대명사 : 가령 ~와 같은 (기능)

 

Consider a progrm / which never exits, or a socket peer / which never stops sending.

=> 프로그램을 생각해봐라 / 절대 종료되지 않는, / 또는 소켓 피어 / 절대 전송을 멈추지 않는

* Consider ~ : 명령문

  명령문은 동사원형으로 시작한다.

  문장앞에 you 가 생략된 상태라고 이해하면 된다.

 

And you don't need to know / to write it / to an HttpResponse header.

=> 그리고 당신은 알 필요가 없다 / 그것을 쓰기 위해서 / HttpResponse header 에

 

The Content-length is managed automatically for you.

=> Content-length 는 자동으로 관리된다.

 

다시 전체 해석을 하면,

There is no such thing / as the size of an input stream. Consider a program / which never exits, or a socket peer / which never stops sending. And you don't need to know / to write it / to an HttpResponse header. The Content-length is managed automatically for you.

input stream 의 size 같은건 없다. 절대 종료되지 않는 프로그램이나 절대 전송을 멈추지 않는 소켓피어를 생각해봐라. 그리고 당신은 HttpResponse header 에 그것을 쓰기 위해서 알 필요가 없다.

 

 

원문 링크

stackoverflow.com/a/35501621

 

How to get the size of an InputStream?

I'm having an InputStream from a ProcessBuilder that acutally reads the stdout stream. Question: how can I know the size of that inmemory InputStream, so I can write it to a HttpResponse http head...

stackoverflow.com

 

오늘의 문법

명령문

간단하고 기본인 명령문에 대해서 알아보겠습니다.

명령문은 문장이 동사원형으로 시작하는 형태입니다.

주로 Consider~ 로 시작하는 문장을 많이 보았죠.

문장앞에 you 가 생략된 상태라고 이해하면 쉽습니다.

 

명령문

Go straight and turn right.
Subscribe to my channel.